Home > Development Tools > VSCode > body text

vscode is not available after installing the go plug-in

王林
Release: 2020-02-13 15:06:20
Original
2711 people have browsed it

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
Copy after login

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
Copy after login

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!