在vscode中编辑、调试golang时会自动安装插件,然而大部分均会失败。
解决办法:手动安装
1、下载插件
1 cd $GOPATH/src 2 mkdir -p golang.org/x 3 cd golang.org/x 4 git clone https://github.com/golang/tools.git tools 5 git clone https://github.com/golang/lint.git lint
2、安装插件
1 cd $GOPATH 2 go install github.com/ramya-rao-a/go-outline 3 go install github.com/acroca/go-symbols 4 go install golang.org/x/tools/cmd/guru 5 go install golang.org/x/tools/cmd/gorename 6 go install github.com/sqs/goreturns 7 go install github.com/golang/lint/golint
原文地址:https://www.cnblogs.com/mcgill0217/p/10357968.html
时间: 2024-10-05 22:09:02