This is a creation in Article, where the information may have evolved or changed.
Golang installation and environment variable settings
1. Golang installation package download and installation
To Golang official website to download the latest version of the installation package Go1.6.3.windows-amd64.msi, download and run the installation directly, the installation path will use its default C:\Go\ , then all the way Next and complete the installation.
2. Golang environment variable setting
Golang needs to configure Goroot, Gopath,path three environment variables. If the default installation path C:\Go\ is used in the first step of installation, the Setup program has set the Goroot and PATH environment variables so that they do not need to be manually set. Such as:
Gopath is a follow-up code directory, create a new system variable Gopath and point it to your code directory, such as:
Verify that the Golang is installed successfully:
Open the CMD Command Line window and enter the Go env. The output, if it represents success:
Second, the installation and use of Liteide
1, Windows to debug go, need to install MinGW, download Mingw-get-setup.exe. Download Address: https://sourceforge.net/projects/mingw/files/
To run the mingw-get-setup.exe directly, click Install and it will appear:
Click Basic setup→ to select Mingw-developer-toolkit and mingw32-base Two packages click menu →installation→apply changes. For installation.
After successful installation, append the path of the bin directory of the MinGW installation directory to the PATH environment variable.
2. Download and installation of Liteide
Download the latest binary package Liteidex30.2.windows-qt4.zip, unzip, run Liteide/bin below the Liteide.exe
3,the Liteide setting
Open the System drop-down bar in the toolbar and select Win64. view → Edit the current environment, the default configuration is as follows:
View → Management gopath ..., we use the same gopath that you set up when you install Go.
These are the steps to build the Golang development environment on Windows.