配置
Windows
选一个
go env -w GOPROXY=https://goproxy.cn,direct
go env -w GOPROXY=https://mirrors.aliyun.com/goproxy,direct
Mac/Linux
export GOPROXY=https://goproxy.cn
export GOPROXY=https://mirrors.aliyun.com/goproxy
查看环境配置
查看GOPROXY是否配置成功。
go env
其他镜像地址
- 七牛:https://goproxy.cn
- 阿里:https://mirrors.aliyun.com/goproxy/
- 官方:https://goproxy.io/