Golang V1.13之后支持通过设置变量GOPROXY来修改代理地址,默认的代理服务器
https://proxy.golang.org在国内访问经常出现timeout
![](https://static.studygolang.com/191211/5a5f34befc1d73c082b58d767f3c78a2.png)
image.png
可以通过设置国内代理来加速下载
详见:https://github.com/goproxy/goproxy.cn/blob/master/README.zh-CN.md
在终端执行即可
go env -w GOPROXY=https://goproxy.cn,direct
![](https://static.studygolang.com/191211/dd53effe1a73bc209564253f05476f04.png)
image.png
有疑问加站长微信联系(非本文作者)
![](https://static.golangjob.cn/static/img/footer.png?imageView2/2/w/280)