go 设置国内代理

使用go install安装依赖出错,提示连接超时

go install -v golang.org/x/tools/gopls@latest
go install golang.org/x/tools/gopls@latest: module golang.org/x/tools/gopls: Get "https://proxy.golang.org/golang.org/x/tools/gopls/@v/list": dial tcp 172.217.163.49:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

配置国内代理

go env -w GOPROXY=https://goproxy.cn
posted @ 2022-07-29 09:28  leechg  阅读(2191)  评论(0编辑  收藏  举报