This is a creation in Article, where the information may have evolved or changed.
0
Resources
Official Download Address https://code.google.com/p/go/downloads/list
Go Language Civil service network http://zh.golanger.com/
1
Download the installation package
in the official download of the appropriate Go language development package for Windows, use the MSI installation package here.
2
installation
run the downloaded MSI installation file, all the way next to know the installation is complete.
Note 1: Do not have Chinese in the path when you select the installation path.
NOTE 2: If you use a ZIP package, you need to set the environment variable,
system Variable Name: Goroot value: Where Go is installed
system variable Name: Path append value:;%goroot%\bin
3
Confirm Installation Success
execute the command under Windows Command prompt Cmd.exe window: Go version, after which the correct version information appears.
4
Writing code
Create a new 1 TXT file, open and enter the following code:
Package Main
import "FMT"
Func Main () {
FMT. Printf ("Hello World, imleeo!")
}
Note:
Func Main () {
can not be written
func main ()
{
Otherwise, the error will be compiled
5
Save
Save: Save as Imleeo.go file
6
compiling
compile: Execute command in cmd, go build-o C:\imleeo.exe C:\imleeo.go
7
Execution
execute: Execute command in cmd, Imleeo.exe
8
Show
The word "Hello World, Imleeo" is displayed in CMD.
Welcome to Go QQ Group:215466300