Go installation and Environment configuration in Windows environment
First visit http://golangtc.com/download to download the Go installer package and Liteide
Here we choose Go1.5.1.windows-amd64.msi and Liteidex28.windows-qt4.zip.
Install Go package directly double-click Go1.5.1.windows-amd64.msi to change the installation address to D:\go
Liteide also unzip to D-Disk double-click Run leteide Select View-Edit Current environment Modify #goroot=e:\gowork Ctrl+s Save
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/79/6D/wKioL1aQuAGi8teeAAQkn-uUs6c829.jpg "title=" 1.JPG " alt= "Wkiol1aquagi8teeaaqkn-uus6c829.jpg"/>
Modify the system environment variable to include in the system environment variable
Goroot D:\GO
Gopath E:\GOWORK
PATH D:\go\bin;e:\gowork\bin
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/79/6F/wKiom1aQuOHSqV_iAAGaUKrio6A427.jpg "title=" 1.JPG " alt= "Wkiom1aquohsqv_iaagaukrio6a427.jpg"/>
Install SUBLIMETEXT3 access HTTP://WWW.SUBLIMETEXT.COM/3 download installation run SUBLIMETEXT3
Installing the Gosublime plugin via package control (CTRL+SHIFT+P)
1. Access Https://packagecontrol.io/installation replication Sublimetext3
import urllib.request,os,hashlib; h = ‘2915d1851351e5ee549c20394736b442‘ + ‘8bc59f460fa1548d1514676163dafc88‘; 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)
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/79/6F/wKiom1aQusLBw3HKAAQf2LAstK0176.jpg "title=" 1.JPG "alt=" Wkiom1aquslbw3hkaaqf2lastk0176.jpg "/>
2. Return to SUBLIMETEXT3 window select View-show Console to paste the contents of the previous copy (step 1) Enter run
3. Open Sublimetext3 Control window (ctrl+shift+p) input PICP Enter install in search go sublimetext install
Go to Preferences--package Settings--gosublime--settings-user set the global working directory E:\gowork
Write the first Go program, enter e:\gowork new application directory application directory to create a new hello.go
Drag the hello.go into the SUBLIMETEXT3 to enter the following code
Package Main
Import (
"FMT"
)
Func Main () {
Fmt. Println ("Hello World")
}
Open cmd to enter E:\gowork\application\hello input go run hello.go
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/79/6F/wKiom1aQvk7x0XU_AAGsOZjd6KQ048.jpg "title=" 2.JPG " alt= "Wkiom1aqvk7x0xu_aagsozjd6kq048.jpg"/>
The program ran successfully.
The above is the Windows environment for Go installation and environment configuration
This article is from the "Last Night Rain Wind Sudden" blog, please be sure to keep this source http://zxx287856774.blog.51cto.com/3417296/1733253
Go installation and Environment configuration in Windows environment