当我们下载github资源时候,常常会出现超时的情况。
go get github.com/gin-gonic/gin
go get github.com/gin-gonic/gin: module github.com/gin-gonic/gin: Get "https://proxy.golang.org/github.com/gin-gonic/gin/@v/list": dial tcp xxx.xxx.xxx.xxx:ooo: i/o timeout
往往解决这种超时的方式可以使用代理的方式可以解决。
如果你在在公司一般可以使用本公司的代理方式,如果不在公司或其他原因可以使用国内常见的代理。
阿里代理
go env -w GOPROXY=https://mirrors.aliyun.com/goproxy,direct
七牛云代理
go env -w GOPROXY=https://goproxy.cn,direct