Problem
Go works fine from the command window, but within IntelliJ you get a message about incorrect SDK version.
Assumption
You installed Go using homebrew.
Go Environment
Here, we see that Go 1.3.1 is the current installed version:
Fix IntelliJ Problem
The go-lang-idea-plugin reported that it expected Go version 1.3, but got 1.3.1.
So, just remove 1.3 (assuming that you don't need it) and create a symlink fro 1.3 to 1.3.1:
Discussion
This feels like such a hack, but I could not find a way to configure the version of the Go SDK for the go-lang-idea-plugin.
If anybody finds a better solution, please let us know. Thanks!
The Rest of the Story
I eventually found where to conigure the Go SDK in IntelliJ.
File > Folder Structure > Project Settings > Modules > Dependencies
Click the Module SDK dropdown and select the latest Go SDK (In my case it is currently Go SDK go1.3.3 darwin/adm64)
If that is not an option, you may need to click the New... button and select the path that is $GOPATH.
Also, verify that you selected the correct Go SDK in File > Project Structure > Project Settings > Project
References
http://lexsheehan.blogspot.com/2014/08/install-godoc-command.html
https://github.com/go-lang-plugin-org/go-lang-idea-plugin/blob/master/Missing%20ENV.md
https://github.com/go-lang-plugin-org/go-lang-idea-plugin/issues/696
http://brew.sh/
This work is licensed under the
Creative Commons Attribution 3.0 Unported License.