由于GOPROXY 默认成了中国大陆无法访问的 https://proxy.golang.org,只需要替换下 Go 模块代理:goproxy.cn
命令行执行命令:go env -w GOPROXY=https://goproxy.cn,direct
要求:go 版本升级为 >=1.13
参考网址:https://codechina.youkuaiyun.com/mirrors/goproxy/goproxy.cn/-/blob/master/README.zh-CN.md
该博客介绍了如何解决由于GOPROXY设置导致的中国大陆无法访问Go模块的问题。通过将GOPROXY替换为https://goproxy.cn的命令行操作,确保Go版本大于等于1.13,可以顺利进行Go模块的下载和更新。参考链接提供了更多关于goproxy.cn的详细信息。
由于GOPROXY 默认成了中国大陆无法访问的 https://proxy.golang.org,只需要替换下 Go 模块代理:goproxy.cn
命令行执行命令:go env -w GOPROXY=https://goproxy.cn,direct
要求:go 版本升级为 >=1.13
参考网址:https://codechina.youkuaiyun.com/mirrors/goproxy/goproxy.cn/-/blob/master/README.zh-CN.md
3289
2126
280

被折叠的 条评论
为什么被折叠?