由于谷歌被墙,跟谷歌相关的模块无法通过go get来下载 
解决方法:

git clone https://github.com/golang/net.git $GOPATH/src/github.com/golang/net

git clone https://github.com/golang/sys.git $GOPATH/src/github.com/golang/sys

git clone https://github.com/golang/tools.git $GOPATH/src/github.com/golang/tools

ln -s $GOPATH/src/github.com/golang $GOPATH/src/golang.org/x

  

如果是Windows下,最后一条可以替换为mklink命令,或者直接拷贝文件夹修改一下名称即可。

go的官方包都在这个目录下: 
https://github.com/golang

 

原文地址:https://studygolang.com/articles/7087

相关文章:

  • 2021-10-24
  • 2021-06-06
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
猜你喜欢
  • 2022-12-23
  • 2021-11-10
  • 2021-10-27
  • 2022-12-23
  • 2021-11-11
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案