我是靠谱客的博主 背后小兔子,这篇文章主要介绍Goland导入github包,现在分享给大家,希望可以做个参考。

goland终端如何导入github上的包

例如:我们要导入gin包,最开始我直接输入go get -u github.com/gin-gonic/gin
会出现以下的问题:
# cd F:goworkspacesrcgithub.comgin-gonicgin; 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,导入成功!!!

最后

以上就是背后小兔子最近收集整理的关于Goland导入github包的全部内容,更多相关Goland导入github包内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(132)

评论列表共有 0 条评论

立即
投稿
返回
顶部