go1.17下载第三方依赖问题
这里整合redis为例
首先我们需要在项目下面把.mod文件删除
然后cmd进去该文件目录,输入这行go env -w GOSUMDB=off
命令
然后继续输入go env -w GOPROXY=https://goproxy.io,direct
修改代理
最后我们就可以开始下载了go get github.com/garyburd/redigo/redis
不进行上述配置机会报如下错误:
go get github.com/garyburd/redigo/redis: github.com/garyburd/redigo@v1.6.3: verifying module: github.com/garyburd/redigo@v1.6.3: Get "https://sum.golang.org/lookup/github.com/garyburd/redigo@v1.6.3": dial tcp 142.251.43.17: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.