安装go依赖包经常会遇到找不到golang.org/x/tools/
的网络错误,需要从github上的镜像安装。
下载/安装
手工拷贝https://github.com/golang/tools
到$GOPATH/src/golang.org/x/tools
注意:需要先设置GOPATH
go install github.com/nsf/gocode
go install sourcegraph.com/sqs/goreturns
go install github.com/golang/lint/golint
go install github.com/newhook/go-symbols
go install golang.org/x/tools/cmd/guru
go install golang.org/x/tools/cmd/gorename
go install github.com/rogpeppe/godef
go install github.com/lukehoban/go-outline