Vscode Installation plugin has failed, the following is the method found online, pro-test available.
Transferred from: https://blog.csdn.net/yo_oygo/article/details/79065966
When installing the Go plugin, will automatically update a lot of dependent library files, are updated from GitHub, but because of GitHub files, there are many applications in the go official website files, resulting, because the network, can not be directly downloaded, resulting in installation failure, as follows:
Installing github.com/nsf/gocode SUCCEEDEDInstalling github.com/uudashr/gopkgs/cmd/gopkgs SUCCEEDEDInstalling github.com/ramya-rao-a/go-outline FAILEDInstalling github.com/acroca/go-symbols FAILEDInstalling golang.org/x/tools/cmd/guru FAILEDInstalling golang.org/x/tools/cmd/gorename FAILEDInstalling github.com/fatih/gomodifytags SUCCEEDEDInstalling github.com/haya14busa/goplay/cmd/goplay SUCCEEDEDInstalling github.com/josharian/impl FAILEDInstalling github.com/rogpeppe/godef SUCCEEDEDInstalling sourcegraph.com/sqs/goreturns FAILEDInstalling github.com/golang/lint/golint FAILEDInstalling github.com/cweill/gotests/... FAILEDInstalling github.com/derekparker/delve/cmd/dlv SUCCEEDED 8 tools failed to install.
These failed libraries, not downloaded down, but since the files on the go official online, led to failure. Here are the solutions,
1, in the%gopath%\src\ directory, set up the Golang.org folder, and then create a new X folder. Directory is "%gopath\src\golang.org\x"
2. After the directory switch is complete, download the plugin package:
git clone https://github.com/golang/tools.git Tools
3, after the execution, there will be a more Tools folder.
4. Open Vscode terminal, switch to terminal, enter "%gopath" directory, execute
go install github.com/ramya-rao-a/go-outlinego install github.com/acroca/go-symbolsgo install golang.org/x/tools/cmd/gurugo install golang.org/x/tools/cmd/gorenamego install github.com/josharian/implgo install github.com/rogpeppe/godefgo install github.com/sqs/goreturnsgo install github.com/golang/lint/golintgo install github.com/cweill/gotests/gotestsgo install github.com/ramya-rao-a/go-outlinego install github.com/acroca/go-symbolsgo install golang.org/x/tools/cmd/gurugo install golang.org/x/tools/cmd/gorenamego install github.com/josharian/implgo install github.com/rogpeppe/godefgo install github.com/sqs/goreturnsgo install github.com/golang/lint/golintgo install github.com/cweill/gotests/gotests
By this method, you can install successfully.
Reference blog:
http://www.pythonsite.com/?p=429
http://blog.csdn.net/langzi7758521/article/details/51313521