This is a creation in Article, where the information may have evolved or changed.
1. Go to http://golang.org to download the go installation package and install it in a fool's style
2. After the installation is complete, you can open the terminal input GO command to detect whether the installation was successful
3. You can enter go version to view the installed Go versions
4. Environment variable Configuration
- Gopath is used to tell the Golang command and other related tools where to find the Go package directory on your system. Gopath is a list of paths, similar to the settings for path
gopath=/home/user/go:/home/user/workspace_go:***
The path to each list item is actually a workspace, and each workspace should contain three directories for the source file (SRC), the related package (pkg), and the execution file (bin).
Method:
A. Modify the ~/.bash_profile file to add code similar to the following:
Export Gopath=/users/heinoc/go:/users/heinoc/documents/workspace/workspace_go
B. Save the file, exit and execute the source ~/.bash_profile make the configuration take effect
C. Use go env to view configuration results
5. Sublime Text 2 Installation
Easy and quick installation for Dummies
- Install the package Control: Open sublime, press CTRL + ' on the command line, and then execute the following command:
Import Urllib2,os; pf='Package Control.sublime-package'; Ipp=sublime.installed_packages_path (); Os.makedirs (IPP)ifNot Os.path.exists (IPP)ElseNone; 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'
- Before and after plastic surgery:
- Installing the Gosublime Plugin
Command + Shift + P opens the package Control and then enters PCIP (the abbreviation for the Control:install), enters the gosublime in the subsequent interface, and the carriage return can be installed.
To this, the Sublime Text 2 + Gosublime's Go language development environment is completed