Reputation: 11
I am trying to setup my visual studio code for go language. but i am getting some errors in installing gopls and 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\\[email protected]\\main.go:14:2: read C:\\Users\\harsh\\go\\pkg\\mod\\golang.org\\x\\[email protected]\\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/[email protected]: zip: not a valid zip file\n"
}
the screenshot of the errors.
Is there any other way to install this tools ?
Upvotes: 1
Views: 1652
Reputation: 21
try using:
go env -w GO111MODULE=on
and
go clean -modcache
and install again.
Upvotes: 1