This is a creation in Article, where the information may have evolved or changed.
Install Go
Open Golang Official website https://golang.org/, click Download the installation version of the required platform, recommended MSI, download completed, click Install, the default settings can be installed to complete the relevant environment variables will be automatically set to complete.
Installing Sublime Text3
Open Sublimetext Official website http://www.sublimetext.com/, click Download the installation version of the required platform, fool-type installation. Of course, in order to extend the sublime plug-in, you need to install the Packdge control feature. After opening the sublime, press the shortcut key CTRL + "'", below will pop up a command window, copy the following, enter, wait for the installation to complete.
import urllib.request,os,hashlib; h = 'df21e130d211cfc94d9b0905775a7c0f' + '1e3d39e33b79698005270310898eea76'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
Installing the Configuration Gosublime plugin
Click the package Control, enter installl ..., select the Install package confirmation, enter Gosublime in the popup dialog box, find the corresponding option, enter. Wait a moment for the installation to complete, observe the description and progress of the sublime task at the bottom, and restart sublime Text after the installation is complete. After you need to gosublime this plug-in configuration, select Preferences->package Setting->gosublime->settings-user, in the open window to enter the following content.
{ "env": { "GOPATH": "D:/mygo", //go程序的个人代码工程路径 "GOROOT": "C:/Go" //go语言的安装路径 }}
Restart under sublime should be ready to use.
Install additional plugins
Through the package control to install the following we need to program the common plug-ins, installation process and install Gosublime, select the package control, enter the install package return, and then enter the corresponding plug-in. The plugin is as follows.
- All autocomplete,sublime only to the current file in this file to find incomplete, all Autocomplete is to open the file to find incomplete, choose more comprehensive.
- ConverttoUTF8, all edited files are encoded using UTF-8.
- Bracket highlighter, brackets match highlighting.