在没有开启科学上网的时候,使用go mod下载相关命令会出现错误:
i/o timeout
goproxy.io
比较主流的golang代理
https://goproxy.io/
有详细的使用教程
快速开始
# Enable the go modules feature
export GO111MODULE=on
# Set the GOPROXY environment variable
export GOPROXY=https://goproxy.ioincremental document synchronization.
如果已开启go module直接在环境变量中添加 GOPROXY
即可