This is a creation in
Article, where the information may have evolved or changed.
Use the MSI file and follow the prompts to install the Go tool. By default, the Setup program uses the go-to distribution in c:\Go. The setup program should set the C:\Go\bin directory to the Windows PATH environment variable. Restart any open command prompt for the changes to take effect.
1. On the official website Go:https://golang.org/dl/  download msi file, but now this site may be wall, so if you do not want to use the latest version can not go over the wall, Baidu network disk has a lot of installation files
2. Install select installation path, environment variables will be automatically configured during installation
3. Verify that after the installation is successful, enter the following command in the console to indicate success:
4. Verifying the installation
Create a go file named Test.go D:\goproject
File:test.go
Import "FMT" Func Main () { fmt. Println ("Hello, world!")}
Attention:
Func Main () {
Can not be written
Func Main ()
{
This is not just code specification, but also the syntax of Go. Or you'll get an error.
5 Compiling run Go code go run xxx.go
Compile the Go code to generate the. exe file go build xxx.go will generate the Xx.exe file