1.Golang Development Environment Construction

Source: Internet
Author: User
Tags install go sublime text
This is a creation in Article, where the information may have evolved or changed.

Install Golang language

    • Download Golang installation package download address: https://golang.org/dl/, please download the appropriate version

      我下载的是windows的版本,默认目录安装为C:\Go
    • Set environment variable path, add C:\Go\bin environment variable

    • Set the environment variable Gopath, the variable is custom, I set to: d:\godev , in the inside manually create SRC directory, the structure is as follows

      SRC Place the source code, PKG is our compiled package storage location, bin is compiled executable document execution directory, after this we will understand

Development tools

Development tool Selection Sublime

    • Installation Sublime text 2: Development tools Select Sublime2, download address: HTTP://WWW.SUBLIMETEXT.COM/2
    • Install package management tools, pack control: Open Sublime2, press the shortcut key Ctrl + ', or menu->view->show console to open the console, enter the following command

      import Urllib2,os; pf= ' package Control.sublime-package '; Ipp=sublime.installed_packages_path (); Os.makedirs (IPP) if not os.path.exists (IPP) else None; Urllib2.install_opener (Urllib2.build_opener (urllib2. Proxyhandler ())); Open (Os.path.join (IPP,PF), ' WB '). Write (Urllib2.urlopen (' http://sublime.wbond.net/' +pf.replace (', '%20 '). Read () ); print ' Restart Sublime Text to finish installation '

      Enter

    • Restart Sublime2, You can find the Proferences menu, the extra menu item, the package control

    • Press and hold the shortcut key CTRL + SHIFT + p or the menu preferences- box, enter the package install Enter, pop-up Packages dialog box, and then enter Gosublime Enter to install the Gosublime plug-in, the same way to install go Build

    • Modify the Gosublime configuration: Under the Preferences menu, locate the package Settings, find the Gosublime, and then find Settings-default. To open the file, add the following configuration and save the

Here we have completed the Golang development environment Setup

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.