原文1: VSCode安装go语言开发环境,go插件问题解决
url:https://blog.csdn.net/yo_oygo/article/details/79065966
原文2:Windows下安装Go Tools 和 golint失败的解决办法
url:https://blog.csdn.net/hooloo/article/details/80220473
---------------------------------------------------------------------------------------------------------------
在安装go插件时,会自动更新很多依赖库文件,都是从Github更新下来,但是因为Github的文件中,多有应用go官网中的文件,导致,因为网络缘故,不能直接下载,导致安装失败,如下:
Installing github.com/nsf/gocode SUCCEEDED
Installing github.com/uudashr/gopkgs/cmd/gopkgs SUCCEEDED
Installing github.com/ramya-rao-a/go-outline FAILED
Installing github.com/acroca/go-symbols FAILED
Installing golang.org/x/tools/cmd/guru FAILED
Installing golang.org/x/tools/cmd/gorename FAILED
Installing github.com/fatih/gomodifytags SUCCEEDED
Installing github.com/haya14busa/goplay/cmd/goplay SUCCEEDED
Installing github.com/josharian/impl FAILED
Installing github.com/rogpeppe/godef SUCCEEDED
Installing sourcegraph.com/sqs/goreturns FAILED
Installing github.com/golang/lint/golint FAILED
Installing github.com/cweill/gotests/... FAILED
Installing github.com/derekparker/delve/cmd/dlv SUCCEEDED
8 tools failed to install.
1、对以下安装失败的解决办法:
go install github.com/mdempsky/gocode
go install github.com/ramya-rao-a/go-outline
go install github.com/acroca/go-symbols
go install github.com/rogpeppe/godef
go install github.com/sqs/goreturns
go install github.com/cweill/gotests
go install github.com/josharian/impl
-----------------------------------------------------------------------
其模式如:github.com/XXX/YYY
*
建立%GOPATH%\src\
github.com\XXX文件夹
* cd
%GOPATH%\src\
github.com\XXX
* git clone
github.com/XXX/YYY.git
2、对以下安装失败的解决办法:
go install golang.org/x/tools/cmd/guru
go install golang.org/x/tools/cmd/gorename
-----------------------------------------------------------------------
*
建立
%GOPATH%\src\golang.org\x
文件夹
* cd %GOPATH%\src\golang.org\x
* git clone https://github.com/golang/tools.git
3、对lint安装失败的解决办法:
go install github.com/golang/lint/golint
-----------------------------------------------------------------------
*
结合 2
* cd %GOPATH%\src\golang.org\x
* git clone https://github.com/golang/lint.git
* 建立%GOPATH%\src\github.com\golang文件夹
* 把%GOPATH%\src\golang.org\x下的lint目录
整体拷贝
到%GOPATH%\src\github.com\golang文件夹下
最后打开VSCode,切换到 终端,进入“%GOPATH”目录,执行
go install github.com/mdempsky/gocode
go install github.com/uudashr/gopkgs/cmd/gopkgs
go install github.com/ramya-rao-a/go-outline
go install github.com/acroca/go-symbols
go install github.com/rogpeppe/godef
go install github.com/sqs/goreturns
go install github.com/derekparker/delve/cmd/dlv
go install github.com/cweill/gotests
go install github.com/josharian/impl
go install golang.org/x/tools/cmd/guru
go install golang.org/x/tools/cmd/gorename
go install github.com/golang/lint/golint
http://www.pythonsite.com/?p=429
http://blog.csdn.net/langzi7758521/article/details/51313521