13
  1. I downloaded go1.4.darwin-amd64-osx10.8.tar.gz and extract it on my local directory.
  2. Based on what Installing to a custom location says I added GOROOT in env variable.
  3. Based on what Test your installation says I created a go file.
  4. I finally ran it and I got expected result as following screenshot.

enter image description here

  • I actually have IntelliJ v.14 however, based on this article I installed Go Language (golang.org) version 0.9.15.3 in my IntelliJ Idea.
  • I created a Go project and during creation it asked me to add GO SDK. I gave it ~/Desktop/go/sdk however it wasn't able to recognise it. I got this error in Event Log:

14:03:02 IllegalArgumentException: Argument for @NotNull parameter 'virtualFile' of com/intellij/openapi/projectRoots/impl/ProjectRootContainerImpl.addRoot must not be null

Any idea how IntelliJ Idea is able to recognize it would be appreciated. Thanks.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Hesam
  • 52,260
  • 74
  • 224
  • 365
  • I even removed lines that I added to env var. and installed .dmg format of GO SDK. although echo $GOPATH and $GOROOT are returning GOPATH and GOROOT but still intelliJ Idea is not able to add the SDK, although it is able to find the path automatically (without I browse to usr/local/go folder. – Hesam Jan 14 '15 at 07:27

3 Answers3

10

Please consider using one of the alpha releases for 0.9.16. I believe that alpha7 could be the more stable one rather than alpha9. You can get them from GitHub releases

The v1.0.0-alpha0 branch is, as the name implies, an alpha release and it's in the early stages of development, that's why there's no release done yet for it as well.

P.S. I'm one of the contributors to the plugin.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
dlsniper
  • 7,188
  • 1
  • 35
  • 44
  • Thanks, I was installed/uninstalled several times in different form to see what is the problem. 0.9.16 fixed my problem. Thanks. – Hesam Jan 14 '15 at 09:27
  • @RaviDalmia can you please open an issue on Github issue tracker for the plugin with some more details about the problem? We currently don't have any reports from our users that the plugin doesn't work with IDEA 14 or 14.1. Thank you. – dlsniper Feb 20 '15 at 16:33
  • @dlsniper I am using IntelliJ 14, and tried the 0.9.16 release, 1.0.0 release and the one which is listed on the IntelliJ plugin link, but they simply do not allow me to add the Go SDK. – Ravi Dalmia Feb 23 '15 at 13:06
  • @RaviDalmia please open an issue on the issue tracker with details about your problem. Currently I'm not aware of any go SDK installation method which would fail to be detected by the plugin. If you are installing the plugin from the zip file, please don't unzip it first, install the zip (it happens on MacOSX, please read the release notes) – dlsniper Feb 23 '15 at 22:18
  • 1
    @dlsniper it seems that I was just extracting and trying to use the plugin. Upvoted for the clarification :) go seems to work now, just one side issue, there seems to be some issue around the output directory of the code, I will try and figure that out. – Ravi Dalmia Feb 24 '15 at 14:08
2

Does not allow to use SDK placed in /usr/local/go (perfectly valid and recent SDK) under Mac Yosemite. Google App Engine does not recognise last valid GAE GO SDK either.

Michele Giuseppe Fadda
  • 1,302
  • 1
  • 17
  • 26
1

~Desktop/go/sdk doesn't seems a valid path (as it refers to the homedir of the 'Desktop' user): ~/Desktop/go/sdk should work better.

As long as you see in that ~/Desktop/go/sdk folders the subfolders 'api', 'bin', 'blog', ..., that should be the right one for the GO SDK expected by the "golang support plugin".

Some issues exist with that plugin and IntelliJ 14: issues 1169, PR 1172 (fixed for for 1.0.0-alpha).
The other approach is to recompile and install that plugin.

The end result of specifying the Go SDK path should look like:

http://pivotallabs.com/wordpress/wp-content/uploads/2013/12/Screen-Shot-2013-12-09-at-4.53.20-PM.png

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250