The "gopls" command is not available. Run "go install -v golang.org/x/tools/gopls@latest" to install.

Ritchie / 2024-11-06 / 原文

VSCode错误提示

解决方案

设置代理:

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

设置完成后重启VSCode