参考链接
tigerbook.cn/article-161.html
官网
https://goproxy.io/
网速折磨了我好久..
![](https://img.haomeiwen.com/i17035812/73c3e4a5188b416c.png)
环境变量加上这几行就好了
# 启用 Go Modules 功能
export GO111MODULE=on
# 配置 GOPROXY 环境变量
export GOPROXY=https://goproxy.io
生效需要加上
go mod init gin-web
go mod edit -require github.com/gin-gonic/gin@latest
![](https://img.haomeiwen.com/i17035812/ba160af6ec8fd032.png)
测试
![](https://img.haomeiwen.com/i17035812/327b486f23ca9fce.png)
![](https://img.haomeiwen.com/i17035812/b221a25cdfd09b33.png)
网友评论