vscode安装golang扩展插件

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

安装完vscode,打开.go文件时,vscode会推荐安装go扩展插件,但是vscode中有些go的插件总是提示安装fail。如golint插件,解决办法如下:

  1. cd $GOPATH/src/golang.org/x/
  2. git clone https://github.com/golang/tools.git
  3. cd $GOPATH/golang.org/x/
  4. git clone https://github.com/golang/lint.git
  5. cd $GOPATH/src
  6. go install github.com/lint/golint

其它插件类似:

cd $GOPATH/src

go get -u -v golang.org/x/tools/cmd/godoc
go get -u -v github.com/nsf/gocode
go get -u -v github.com/golang/lint/golint
go get -u -v github.com/lukehoban/go-outline
go get -u -v github.com/rogpeppe/godef
go get -u -v sourcegraph.com/sqs/goreturns
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v golang.org/x/tools/cmd/guru
go get -u -v github.com/tpng/gopkgs
go get -u -v github.com/newhook/go-symbols
go get -u -v github.com/derekparker/delve/cmd/dlv
go get -u -v github.com/josharian/impl
go get -u -v github.com/cweill/gotests/gotests
go get -u -v github.com/lukehoban/go-find-references
go get -u -v github.com/fatih/gomodifytags
go get -u -v github.com/haya14busa/goplay/cmd/goplay

再go install一下(如果golang.org/x/tools就直接go install而不必再go get了,因为前面的git clone https://github.com/golang/tools.git已经下载了)

 

转载于:https://my.oschina.net/u/2245781/blog/1823271

你可能感兴趣的:(vscode安装golang扩展插件)