#全部模块下载
go get github.com/golang/net
#做下软连接把github文件夹下面的映射到golang.org下,否则其他模块如html安装不上。
ln -s /usr/local/go_path/src/github.com/golang/net /usr/local/go_path/src/golang.org/x/net
#安装websocket模块
go install golang.org/x/net/websocket
示:
cannot download, $GOPATH not set. For more details see: go help gopath
解决方案:
sudo env GOPATH=/Users/ryan/go go get github.com/nsf/gocode
有疑问加站长微信联系(非本文作者)