从github下载完代码
server端#
go list (go mod tidy)
报错:
go: github.com/casbin/casbin/v2@v2.11.0: Get "https://proxy.golang.org/github.com/casbin/casbin/v2/@v/v2.11.0.mod": dial tcp 34.64.4.81: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 env
找到 set GOSUMDB 看是否set GOSUMDB= sum.golang.org
如果是,把它关掉
go env -w GOSUMDB=off
修改代理
go env -w GOPROXY=https://goproxy.cn,direct
再次 go list (go mod tidy)