vscode for golang

1.下载安装 vscode
2.安装Go插件
3.https://github.com/Microsoft/vscode-go/wiki/Go-tools-that-the-Go-extension-depends-on 需要安装的扩展列表:

go get -u -v github.com/nsf/gocode
go get -u -v github.com/rogpeppe/godef
go get -u -v github.com/zmb3/gogetdoc
go get -u -v github.com/golang/lint/golint
go get -u -v github.com/ramya-rao-a/go-outline
go get -u -v sourcegraph.com/sqs/goreturns
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v github.com/tpng/gopkgs
go get -u -v github.com/acroca/go-symbols
go get -u -v golang.org/x/tools/cmd/guru
go get -u -v github.com/cweill/gotests/...
go get -u -v golang.org/x/tools/cmd/godoc
go get -u -v github.com/fatih/gomodifytags
go get -u -v github.com/josharian/impl

4.由于golang.org在国内访问不了,所以上述扩展会安装失败,我们需要使用github.com上的 https://github.com/golang/tools 代替 https://golang.org/x/tools,具体操作方法如下:

go get -u -v github.com/golang/tools/cmd/gorename
go get -u -v github.com/golang/tools/cmd/guru
go get -u -v github.com/golang/tools/cmd/godoc

建立软链接:

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

你可能感兴趣的:(vscode for golang)