执行如下命令添加国内代理修改环境变量:
go env -w GOPROXY=https://goproxy.cn
或者Linux:
export GO111MODULE=on
export GOPROXY=https://goproxy.cn,direct
Windows管理员运行cmd:
setx "GO111MODULE" "on" /m
setx "GOPROXY" "https://goproxy.cn,direct" /m
执行如下命令添加国内代理修改环境变量:
go env -w GOPROXY=https://goproxy.cn
或者Linux:
export GO111MODULE=on
export GOPROXY=https://goproxy.cn,direct
Windows管理员运行cmd:
setx "GO111MODULE" "on" /m
setx "GOPROXY" "https://goproxy.cn,direct" /m