[Golang]-9 Go Bulid 打包报错:A connection attempt failed……解决方法

目录

现象

打包出现下面的错误

go build

go: github.com/auth0/go-jwt-middleware@v0.0.0-20190805220309-36081240882b: Get "https://proxy.golang.org/github.com/auth0/go-jwt-middleware/@v/v0.0.0-20190805220309-36081240882b.mod": dial tcp 216.58.200.241: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.mod 代理连接出错

解决方法

go.mod 设置代理

golang1.13.x 在命令行中可以直接执行:

go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct
上一篇:bzoj 前100题计划


下一篇:There are no licenses to review. Either the software does not specify a license, or the license has