go国内无法下载包解决办法

更换国内代理

来自https://github.com/goproxy/goproxy.cn/blob/master/README.zh-CN.md

$ go env -w GO111MODULE=on

$ go env -w GOPROXY=https://goproxy.cn,direct

报错信息

go: github.com/gin-gonic/gin=1.9.0: module github.com/gin-gonic: Get “https://proxy.golang.org/github.com/gin-gonic/@v/list”: 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.

Top