1.https://go.dev/下载golang包
vi ~/.bashrc
export GOROOT=/home/hong/Downloads/go1.19.4.linux-amd64/go
export GOPATH=/home/bruce/goProject
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
export PATH=$PATH:$GOPATH/bin
source ~/.bashrc
3.go代理
go env -w GOPROXY=https://goproxy.io,direct
go env -w GO111MODULE=on