Skip to content

Instantly share code, notes, and snippets.

@sunloverz
Created December 24, 2014 05:57
Show Gist options
  • Select an option

  • Save sunloverz/99db6a4d36da96488b50 to your computer and use it in GitHub Desktop.

Select an option

Save sunloverz/99db6a4d36da96488b50 to your computer and use it in GitHub Desktop.
GOROOT environment variable is empty or could not be detected properly.
I just found another way to add GOPATH sources in the project.
1) Open Project Structure.
2) Select Project Settings -> Modules -> {your module}
3) Under sources label, select Add Content Root to add GOPATH folder.
4) Mark src folder in GOPATH folder as Sources.
Then the GOPATH is added to the project, and everything works fine. The plugin do not need to know anything about GOPATH.
I think it should works for non-IDEA IDEs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment