I'm using IntelliJ Idea, and the google-go-lang-idea-plugin from:
https://github.com/mtoader/google-go-lang-idea-plugin/issues/173
When I try to add my APT provided Go installation to the Go SDK list, I get the following error
I have tried adding the following directories as the Go SDK root
/usr/share/go/
/usr/share/src/
/usr/lib/go/
/usr/lib/go/src/
/usr/lib/go/pkg/
/usr/lib/go/pkg/linux_amd64
Does anyone know how to get this working? I've commented on the various issues in the bugtracker, however the maintainer claimed that this was fixed 10 months ago.
Failing that, does anyone know what this plugin is actually looking for that would make a directory look like the SDK directory?
I came this issue when config goroot path in goland idea.
Go the GO SDK path and find zversion.go
, then append the file with
const TheVersion = `go1.17.2`
. You need to change the version according to you case.
In my case the sversion.go
path is located at D:\Programs\Go\src\runtime\internal\sys\zversion.go
.
Save the file, and restart the goland ide, then config the GOROOT (File -> setting -> Go -> GOROOT -> + -> local...), select you Go root path and save it.