First go to go Language official website Download the latest installation package, I currently installed version is 1.8.3 version: Go1.8.3.windows-amd64.msi If the download is slow, this is Baidu Cloud address: Https://pan.baidu.com/s/1c10YXf6 Click the MSI file to install directly, according to the installation prompt installation, the default installation path is C:\Go. When the installation is complete, configure the system environment variables, and add "in the path variable"; C:\Go\bin "Remember the path before adding; semicolons, separated as paths. After the configuration is complete, verify that the configuration is successful, you go into run. = cmd, enter go-help to get such as: stating that your configuration was successful. To create a simple go project below, Hello word! i created the F:\GoProject\hello directory (you can create your own working directory according to your situation), and then in this directory creates a Hello.go file with the following file contents:
Package Mainimport "FMT" Func Main () { fmt. Printf ("Hello, world\n")}
Then you go to the cmd command line to execute this file: C:\USERS\ADMINISTRATOR>F:F:\>CD F:\goproject\hellof:\goproject\hello>go build completes, A hello,exe run file appears next to Hello.go, remember not to double-click to execute it, but enter hello to get the following: Hello world! Then it's done! For more information, please refer to the Go Language website: https://golang.org/
Go Development Environment Installation tutorial Windows