具体报错
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代理:
go env -w GOPROXY=https://goproxy.cn,direct
设置GOPRIVATE跳转私有库:
go env -w GOPRIVATE=.gitlab.com,.gitee.com
关闭GOSUMDB
go env -w GOSUMDB=off
设置GOSUMDB
go env -w GOSUMDB=“sum.golang.google.cn”
解决