网上一堆解决方法都是在gopath下建文件然后拉git等等,使用过后都无效。。。。。
参考自:https://www.cnblogs.com/xll970105/p/11906899.html 亲测可用
go版本 1.15.2 2020.10.15食用可行
打开Powershell 输入以下命令,然后重新打开vscode点安装即可
原理是Go有一个全球模块代理,设置一下代理再去安装,就可以十分顺利的进行。,分享一下原网站 https://goproxy.io/
$env:GO111MODULE="on" $env:GOPROXY="https://goproxy.io" go env -w GOPROXY=https://goproxy.io,direct go env -w GOPRIVATE=*.corp.example.com
附上结果图,有个插件没安装上,应该影响不大