golang The "gopls" command is not available. Use "go get -v golang.org/x/tools/cmd/gopls" to install.
时间:2019-12-13 15:39:34
收藏:0
阅读:772
vscode启动,出现下面提示,点安装会失败。
The "gopls" command is not available. Use "go get -v golang.org/x/tools/cmd/gopls" to install.
下面是手工解决方案:
github.com中对应golang.org/x/tools/的路径:
https://github.com/Go-zh/tools.git
git clone ,如果慢,就直接下载ZIP吧。
然后解压到: $GOPATH/src/github.com/Go-zh/tools
gopls路径为:$GOPATH/src/github.com/Go-zh/tools/cmd/gopls
然后安装就行了:
cd $GOPATH/src
go install github.com/Go-zh/tools/cmd/gopls
原文:https://www.cnblogs.com/xiaoxiaof/p/12035053.html
评论(0)