This is a creation in Article, where the information may have evolved or changed.
Installing Golang
Go Language Home page:
https://golang.org/
Go language installation Download:
Https://golang.org/dl
environment variable settings:
Goroot:
Goroot variable set the root directory of Go installation, under Windows, usually C:\go
Gopath:
Gopath variable set the root directory where go source code is stored
Installing Sublime TEXT3
First, install Sublime Text 3:
Http://www.sublimetext.com/3
Next, install the Sublime Text 3 package Control:
Https://packagecontrol.io/installation#st3
Run Sublime Text 3, press the shortcut key Ctrl+' bring up the console, execute the Python code in the above page to install the package control, and then restart Sublime Text 3.
Finally, install the plugin gosublime:
1) in Sublime, press and hold the shortcut key SHIFT + CTRL + P, enter the install package in the pop-up box , and press ENTER
2) Next, enter Gosublime, and press ENTER (may need to wait a little bit, can see sublime the bottom of the state)
3) After thegosublime installation is complete, click menu item Preferences , package settings , gosublime - Settings-uesrs, configuring gopath,goroot
Enter the following in the open window and save
{" env": { "Gopath": "C:/go", "Goroot": "D:/goworkspace" }}
4) Configure (optional), click the menu item Tools->build system->new Build System, enter the following in the open window and save
{"cmd": ["Go", "Run", "$file _name"], "File_regex": "^[]*file \" (... *) \ ", line ([0-9]*)", "Working_dir": "$file _path", "selector": "Source.go"}
Other references:
Sublime TEXT3 + Golang Building development environment