vscode 安装go插件失败的解决方法

Posted on 2024-06-24 18:23  tom喵  阅读(925)  评论(0)    收藏  举报

vscode 在安装 go 插件后会在页面的右下角显示 The "gopls" command is not available. Run "go install -v golang.org/x/tools/gopls@latest" to install.

 

 

而我们按照提示 点击 install 后还是无法安装 

以下为解决方法:

在 cmd 里面输入 go env -w GOPROXY="https://goproxy.cn"  关闭vscode重新打开,按照提示再次install 即可搞定

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3