Goland 使用 go modules的TIPS - Go语言中文社区

Goland 使用 go modules的TIPS


运行go mod tidy,报错:

go: golang.org/x/sys@v0.0.0-20180905080454-ebe1bf3edb33: unrecognized import path "golang.org/x/sys" (https fetch: Get https://golang.org/x/sys?go-get=1: dial tcp 216.239.37.1:443: c
onnectex: A connection attempt 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: error loading module requirements

原因是某些依赖在国内被墙了,这边可以设置一下proxy,就可以解决:

进入Goland的设置界面,File/Settings/Go/Go Module(vgo),设置一下Proxy为:https://goproxy.io

版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/u012560213/article/details/88966194
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2019-09-01 19:16:25
  • 阅读 ( 2017 )
  • 分类:Goland

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢