升级安装go1.13.5

运行文件时报错 verifying github.com/mattn/[email protected]/go.mod: github.com/mattn/[email protected]/go.mod: Get https://sum.golang.org/lookup/github.com/mattn/[email protected]: dial tcp 216.58.200.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.
verifying github.com/onsi/[email protected]/go.mod: github.com/onsi/[email protected]/go.mod: Get https://sum.golang.org/lookup/github.com/onsi/[email protected]: dial tcp 216.58.200.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.
verifying github.com/mattn/[email protected]/go.mod: github.com/mattn/[email protected]/go.mod: Get https://sum.golang.org/lookup/github.com/mattn/[email protected]: dial tcp 216.58.200.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 1.13中,我们可以通过GOPROXY来控制代理

注意 : 通过 GOPRIVATE 控制私有库不走代理

这个网站是被墙了的,用于验证包的有效性,可以通过如下命令关闭:

go env -w GOSUMDB=off

私有仓库自动忽略验证

可以设置 go env -w GOSUMDB="sum.golang.google.cn", 这个是专门为国内提供的sum 验证服务

猜你喜欢

转载自www.cnblogs.com/zhaoxueru/p/12157633.html
今日推荐