【Go】解决VSCode安装Go插件失败问题

【Go】解决VSCode安装Go插件失败问题

Win10

Go 1.17.3

VS Code 1.62.2

问题现象

使用vscode开发go程序时,提示未安装go插件,点击Install ALL

 

 

会报一堆安装失败

go-outline:Error: Command failed: D:Gobingo.exe get -u -v github.com/ramya-rao-a/go-outlinegithub.com/ramya-rao-a/go-outline (download)Fetching https://golang.org/x/tools/go/buildutil?go-get=1https fetch failed: Get https://golang.org/x/tools/go/buildutil?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

 解决办法

使用https://goproxy.io代理

在CMD窗口中设置Go环境变量

go env -w GO111MODULE=ongo env -w GOPROXY=https://goproxy.io,direct

 关闭,重新打开vscode,点击Install All即可完成安装

 


比丘资源网 » 【Go】解决VSCode安装Go插件失败问题

提供最优质的资源集合

立即查看 了解详情