china mainland download

https://golang.google.cn/

1
curl -O https://dl.google.com/go/go1.12.6.linux-amd64.tar.gz
1
2
3
4
5
export GOROOT=/root/go
export GOPATH=/root/gopath
export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
export GOBIN=/path/to/go/bin

GOPATH:

linux:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11

mkdir -p /home/wiloon/my-projects/golang/lib/

mkdir -p /home/wiloon/my-projects/golang/projects/

export GOPATH="/home/wiloon/my-projects/golang/lib/:/home/wiloon/my-projects/golang/projects/"

#check golang version
  
go version
  

windows:

GOPATH=C:\workspace\myproject\golang\lib;C:\workspace\myproject\golang\gox