1、go1.11以上版本,启动go mod
设置GO111MODULE
go env -w GO111MODULE=on
2、启动代理
设置GOPROXY
,解决go get失败问题,如vscode的golint等工具
go env -w GOPROXY=https://goproxy.cn,direct
3、设置私有库
设置GOPRIVATE
,域名无需http 或 git
go env -w GOPRIVATE=私有库域名