Install the Go tools
Windows
The Go project provides two installation options for Windows users : a zip archive that requires you to set some environment variables and an MSI installer that configures your installation automatically.(推荐使用MSI安装包会自动配置环境变量)
MSI installer
Open the MSI file and follow the prompts to install the Go tools. By default, the installer puts the Go distribution in c:\Go
.
The installer should put the c:\Go\bin
directory in your PATH
environment variable. You may need to restart any open command prompts for the change to take effect.
Linux
Download the archive and extract it into /usr/local
, creating a Go tree in /usr/local/go
. For example: