[英]I am getting some errors in installing go tools for vscode
I am trying to setup my visual studio code for go language.我正在尝试为 go 语言设置我的 Visual Studio 代码。 but i am getting some errors in installing gopls and go-outline.但我在安装 gopls 和 go-outline 时遇到了一些错误。
errors错误
Installing github.com/ramya-rao-a/go-outline@latest FAILED
{
"killed": false,
"code": 1,
"signal": null,
"cmd": "C:\\Program Files\\Go\\bin\\go.exe install -v github.com/ramya-rao-a/go-outline@latest",
"stdout": "",
"stderr": "C:\\Users\\harsh\\go\\pkg\\mod\\github.com\\ramya-rao-a\\go-outline@v0.0.0-20210608161538-9736a4bde949\\main.go:14:2: read C:\\Users\\harsh\\go\\pkg\\mod\\golang.org\\x\\tools@v0.1.1\\go\\buildutil\\allpackages.go: unexpected NUL in input\n"
}
Installing golang.org/x/tools/gopls@latest FAILED
{
"killed": false,
"code": 1,
"signal": null,
"cmd": "C:\\Program Files\\Go\\bin\\go.exe install -v golang.org/x/tools/gopls@latest",
"stdout": "",
"stderr": "go: downloading golang.org/x/tools v0.1.11-0.20220407163324-91bcfb1bdf9c\nverifying github.com/sergi/go-diff@v1.1.0: zip: not a valid zip file\n"
}
the screenshot of the errors.错误的屏幕截图。
Is there any other way to install this tools?有没有其他方法来安装这个工具?
try using:尝试使用:
go env -w GO111MODULE=on
and和
go clean -modcache
and install again.并再次安装。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.