安装完vscode,打开.go文件时,vscode会推荐安装go扩展插件,但是vscode中有些go的插件总是提示安装fail。如golint插件,解决办法如下:
- cd $GOPATH/src/golang.org/x/
- git clone https://github.com/golang/tools.git
- cd $GOPATH/golang.org/x/
- git clone https://github.com/golang/lint.git
- cd $GOPATH/src
- go install github.com/lint/golint
有疑问加站长微信联系(非本文作者)