Install Golang
1. download .msi from link:
https://www.golangtc.com/download
2. begin the installation progress, and then config system settings shown as below:
variables values
GOBIN ../GO/BIN
GOARCH 386 //if 'amd64', not work
GOOS windows
GOROOT ../GO
path 'add' the %GOBIN%
C:\Users\mmxpa>go env
set GOARCH=386
set GOBIN=F:\programFiles\Go\bin
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=I:\Docker\goworkstation
set GORACE=
set GOROOT=F:\programFiles\Go
set GOTOOLDIR=F:\programFiles\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set GO386=sse2
set CC=gcc
set GOGCCFLAGS=-m32 -fmessage-length=0
set CXX=g++
set CGO_ENABLED=0
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
C:\Users\mmxpa>
Install sublime text 3
Install Package Control: https://packagecontrol.io/
Manually download link address:
https://packagecontrol.io/Package%20Control.sublime-package?_ga=2.217253651.400510008.1520600091-1748180832.1520600091
INSTALLATION
Simple
The simplest method of installation is through the Sublime Text console. The console is accessed via the ctrl+` shortcut or the View > Show Console menu. Once open, paste the appropriate Python code for your version of Sublime Text into the console.
import urllib.request,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; 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)
TroubleShooting:http://blog.csdn.net/JiangChunYuan/article/details/54708102
Add GoSublime/Gocode repository to Package Control:
1). Preferences --> Package Control --> select '...: Add Repository', input 'https://github.com/DisposaBoy/GoSublime' to the blank.
https://github.com/nsf/gocode
Install GoSublime via Package Control
网友评论