解决国内go get 安装gin超时问题

阅读 97

2022-03-23

执行“go get -u github.com/gin-gonic/gin”报错

go get: module github.com/gin-gonic/gin: Get "https://proxy.golang.org/github.com/gin-gonic/gin/@v/list": dial tcp 172.217.160.113:443: i/o timeout

解决方法
使用国内七牛云的 go module 镜像。

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

下载成功后在GOPATH下即可看到对应的文件夹
在这里插入图片描述

精彩评论(0)

0 0 举报