By the end of this post you are going to be able to use IntelliJ and leverage its cool features to work with your Go projects.
Install Golang with Homebrew
1 brew install go --cross-compile-common --with-cgo --use-gcc
Install IntelliJ IDEA 13
At the time of this post’s writing, IntelliJ 13 is still in Early Access Program (EAP). Here is the download link:
Install golang.org support plugin
Once you have installed IntelliJ, go to preferences ( Command + , ) and go to the Plugins tab. Here, you will see all the available plugins that can be enabled/disabled immediately. The one that we need, however, has to be downloaded.
Browse repositories the middle button at the bottom of the Preferences panel. This will open up a panel that allows you to install third-party plugins for IntelliJ. Look for
golang.org support plugin.
Once you have highlighted the row as shown as above, click the download button (top left corner, the second button). Once you have installed this, restart IntelliJ.
Configure Go SDK in IntelliJ
Project Structure Panel (Command + ;).
Select the SDK tab, click the
+ button to add a new SDK and choose
Once you click
Go SDK, you will be prompted to locate the Go folder. If you installed Go using Homebrew, you should be able to change directory to (In Finder, you can press Cmd+Shift+G to open up panel to go to folder)
(your version may vary), and click ‘choose’
That’s it! You can now start your Go project by going to “File > New Project”