本文共 610 字,大约阅读时间需要 2 分钟。
由于Google相关的包无法直接下载,可以使用如果方式下载下来,然后创建软连接或者修改文件夹名称来解决:
第一步:git clone https://github.com/golang/net.git $GOPATH/src/github.com/golang/netgit clone https://github.com/golang/sys.git $GOPATH/src/github.com/golang/sysgit clone https://github.com/golang/tools.git $GOPATH/src/github.com/golang/toolsgit clone https://github.com/golang/lint.git $GOPATH/src/github.com/golang/lint...
通过查看 可以获取更多的信息
第二步:将net、sys、tools三个文件夹放到 $GOPATH/src/golang.org/x 目录下。或者Linux下可以创建软连接:ln -s $GOPATH/src/github.com/golang $GOPATH/src/golang.org/x
说明:上述通过环境变量指示的路径如果有问题,可以使用其他路径表式(如绝对路径)
。转载于:https://blog.51cto.com/huanghai/2355929