This is a creation in Article, where the information may have evolved or changed.
The Go Language (Golang) is a new programming language launched by Google. For its detailed introduction please Baidu, Direct introduction of the basic development environment configuration.
1. Install the Go installation package.
The official download address should be https://code.google.com/p/go/downloads/list.
But if you are in the wall, you should be unable to access the address, here is the version is Go1.3.windows-386.msi, can be directly Baidu file name download installation.
2, configure environment variables.
This is similar to the Java environment variable configuration, with slightly more configuration items. Specific as follows:
new variable name: GOBIN variable Value: D:\Program Files (x86) \go \ Bin
New variable name: Goarch Variable Value: 386
New variable name: GOOS Variable Value: Windows
New variable name: Goroot variable Value: C:\go
Edit path at the end of the variable value of path plus%gobin%
D:\Program files (x86) \go is the native go install location, the MSI file installed, the Go language environment variables will be set automatically. Test command discovery is not recognized, view environment variables only path and Goroot are set, so you can reset it yourself.
3, test the installation is successful.
To bring up the command prompt, enter go version and the following message appears at the command prompt, indicating that the installation was successful.
Microsoft Windows [version 6.1.7601] Copyright (c) Microsoft Corporation. All rights reserved. C:\users\princeterence>go Versiongo version go1.3 windows/386
5. Hello world! using Notepad, create a new text and enter the code as follows:
Package Mainimport "FMT" Func Main () {FMT. Printf ("Hello world!\n God Bless you!");}
then save as Test20150525.go, where the file has an E disk, and then execute the following compile command to complete the compilation execution.
E:\>go Build Test20150525.goe:\>test20150525.exehello world! God Bless you!
Gensis 14:12 and they took Lot,abram ' s brother ' s son,who dwelt in sodom,and his goods, and departed.