This is a creation in Article, where the information may have evolved or changed.
List of learning sites:
Golang Official website: https://golang.org/
Golang Standard library Documentation: HTTPS://GOLANG.ORG/PKG
Golang Chinese Standard library document: Https://studygolang.com/pkgdoc
First, install Go
Guide Links:
https://studygolang.com/articles/1605
Https://github.com/astaxie/build-web-application-with-golang/blob/master/zh/01.1.md
http://blog.csdn.net/defonds/article/details/50538077
Download Address:
Https://www.golangtc.com/download
Step-1: Install Go
Installation tips:
1, for the people do not have to look, jump directly to the next step.
2, installation of the default path is best not to modify, so Windows system will default set system variables.
Step-2: Check if GO is installed
If the usage information is included, the go installation is successful.
Second, Go language environment variable setting
$GOROOT: Point to the root directory after installation of Golang, if you choose. msi installation, the default is C:/go under Windows platform, and the system environment variable is automatically written by Setup during installation.
\ (GOBIN: Point to the Bin directory under the root directory after installation, i.e. \) The default is C:/go/bin under the Goroot/bin,windows platform, which is automatically added to the path variable by the installer during the installation process for us only need to configure Goroot and Gobin (if you download an MSI installation, it is automatically written to the environment variable, Without our configuration).
Step-1:goroot settings
Right--My computer--Properties--Advanced system settings--environment variables (for those of me who do not pull a few or a note here).
If the installation path is the default path when Goland is installed, environment variables are automatically added.
Step-2: Adding a bin path to the path variable
C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Lenovo\Fingerprint Manager Pro\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\TortoiseSVN\bin;D:\phpStudy\PHPTutorial\php\php-7.0.12-nts;C:\composer;C:\Go\bin
Step-3: View version
Go version
Third, the construction of the editing environment
Build your own project environment, such as the project directory as follows:
D:\workspace\GoProject
STEP-1: Setting Project Environment variables
Step-2: Verify that the project environment variable is successful
Execute command: Go env, make a review as shown below to indicate success.
Step-3: Installing Goland
1, Goland download address: http://www.jetbrains.com/go/.
2. After the installation is complete, open the project D:\workspace\GoProject that has just been established.
3, and need to set environment variables, the first time opened in the upper right corner of the prompt.
Step-4: Writing the first go program
Step-5: Run with Goland IDE
Step-6: Compiling with the system
After compiling in the project, there will be one more folder bin, and one more file hello.exe.
Then execute the file in the project directory.
Four, the beginning of everything difficult, continue to work hard