goland终端如何导入github上的包


例如:我们要导入gin包,最开始我直接输入go get -u github.com/gin-gonic/gin
会出现以下的问题:
# cd F:\goworkspace\src\github.com\gin-gonic\gin; git pull --ff-only
fatal: not a git repository (or any of the parent directories): .git
package github.com/gin-gonic/gin: exit status 128
然后我在终端输入go env -w GO111MODULE=on
还是无法导入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 34.64.4.81:443: connectex: A connection atte
mpt 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.

之后我又输入:go env -w GOPROXY=https://goproxy.cn,direct
然后在输入go get -u github.com/gin-gonic/gin,导入成功!!!
————————————————
版权声明:本文为CSDN博主「catboygg-」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_44033530/article/details/108421044

goland终端如何导入github上的包

上一篇:SAP 用户监控管理


下一篇:AS3 结合基本的动画和AS3绘图API