一、问题
用 go build
创建项目,拉取go第三方扩展包的时候报如下错误:
dial tcp 142.251.43.17: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.
二、分析
查看 GOPROXY的配置
因为:set GOPROXY=https://proxy.golang.org
代理推荐:
go env -w GOPROXY=https://goproxy.cn,direct
再次执行命令 go build
,成功~