Home >Development Tools >VSCode >vscode is not available after installing the go plug-in
After installing the ms-vscode.go plug-in in vscode, you can enable support for the go language, but the ms-vscode.go plug-in needs to rely on some tools.
The following are the steps to manually install dependent tools:
In the %GOPATH%\src\ directory, create the path golang.org\x
Enter %GOPATH%\src \golang.org\x, download the source code of the required tools git clone https://github.com/golang/tools.git (tools can be other project names)
After the clone is completed, a tools file will be generated folder, so that the source code required by the tool is ready.
Enter %GOPATH% and execute:
go install github.com/acroca/go-symbols go install github.com/cweill/gotests go install github.com/cweill/gotests/gotests go install github.com/golang/lint/golint go install github.com/lukehoban/go-outline go install github.com/newhook/go-symbols go install github.com/nsf/gocode go install github.com/ramya-rao-a/go-outline go install github.com/rogpeppe/godef go install github.com/sqs/goreturns go install github.com/tpng/gopkgs go install github.com/zmb3/gogetdoc go install golang.org/x/tools/cmd/gorename go install golang.org/x/tools/cmd/guru go install sourcegraph.com/sqs/goreturns
If there is an error when executing the above, please use go get first, and then use the above command
go get github.com/rogpeppe/godef go get github.com/cweill/gotests/gotests
to process it separately golint, the source code of golint is located at https://github.com/golang/lint. Enter %GOPATH%\src\golang.org\x and execute git clone https://github.com/golang/lint to download the source code required by golint. .
Enter %GOPATH% and execute:
go install golang.org/x/lint/golint
In this way, the installation of the tools that vscode's golang plug-in depends on is completed.
Related recommendations: vscode tutorial
The above is the detailed content of vscode is not available after installing the go plug-in. For more information, please follow other related articles on the PHP Chinese website!