1, download the Go Language Windows installation package, you can directly to the official website to download, also can download from this site cloud disk, because the domestic was banned, go language official website often will not open Win32 version: Link: http://pan.baidu.com/s/1eQlIT2M Password: QOSR Win64 version: Link: http://pan.baidu.com/s/1qWmK7wg Password: r5z72. Double-click Install, default installation, direct point "next" on the line, the default is installed in the C:\go, you can also modify into other directories, the directory should not contain Chinese name
3. Set the system environment variable goroot, and put the%goroot%\bin; Add to the PATH environment variable go to XP under the following
Win7 the following:
4. Enter go in the command line mode, if the following characters are output, the Go language is basically installed successfully.
5. Set the GOPATH environment variable, create a new directory in C: \ Go_project, add the system environment variable Gopath point to it, the GOPATH environment variable can be set at the same time how much, Windows under; partition, Linux under: Number delimited, use go The Get command installs the third-party library when installed by default in the first Gopath directory
6. We now write a small program to verify that the new hello.go is saved to c:\go_project\src under the package Mainimport ("FMT") func main () {FMT. Println ("hello,go!")}
6. How to install a third-party development library, to install the third party libraries, you need to install the GIT client on your computer, to ensure that in command-line mode git command can use
The GIT installation package is as follows: Link: http://pan.baidu.com/s/1o6ieRea Password: JOH8
As an example of installing the most common MySQL driver, enter in command line mode: Go get github.com/go-sql-driver/mysql
Hyper-Verbose Go language Windows installation full guide