golang编译出现问题

现象:

项目中引入了第三方包(github.com/jinzhu/copier),编译的时候出现了

go: github.com/jinzhu/[email protected]: verifying go.mod: github.com/jinzhu/[email protected]/go.mod: reading http://192.168.24.11:3000/sumdb/sum.golang.org/lookup/github.com/jinzhu/[email protected]: 502 Bad Gateway
go: git.apache.org/[email protected] (replaced by bjgitlab.gnetis.com/golang/open-source/[email protected]): missing go.sum entry; to add it:
	go mod download git.apache.org/thrift.git这个错误。

问题原因:

sum.golang.org无法访问,换一个sumdb就可以了

解决方案:

export GOSUMDB=sum.golang.google.cn

你可能感兴趣的:(Go,golang)