Setting Up a Go Development Environment on Mac OS X
Environment
- Mac OS X 10.10.4 Yosemite
- Go 1.4
- Eclipse Mars Release (4.5.0)
Overview
As of 2015-08-01
I had been considering using IntelliJ for Go development, but
since it didn’t support Go version 1.4,
I’ll set up GoClipse in Eclipse to get features like code completion working.
Installing Go
1 | $ brew install go |
If you haven’t installed brew yet, see the following
https://kenzo0107.github.io/2015/02/27/2015-02-28-install-homebrew-on-macosx/
Checking the Go Version
1 | $ go version |
Setting Environment Variables
Personally I use ~/.zshrc, but if you don’t have it,
add the following to something like ~/.bash_profile.
1 | # go |
By the way, -x checks whether a file is executable.
In other words, “if [ -x “which go“]” checks whether the which go command can be executed.
In the current local environment, typing which go
gives the following.
1 | $ which go |
GOPATH
- This becomes your workspace. You will create your projects under this directory.
- This is where things are stored when you run
go installorgo get.
Checking Go Environment Information
1 | $ go env |
- When you install
gowithbrew, GOROOT is located under/usr/local/Cellar/.
Applying the Environment Variable Settings
For .zshrc
1 | $ source .zshrc |
For .bash_profile
1 | $ source .bash_profile |
Installing GoClipse

Configuring the GoClipse Software Location
- Enter http://goclipse.github.io/releases/ as the Location and click OK
- Check GoClipse and click the
Next >button to proceed with the installation.

Select GoClipse and Install
- Check GoClipse and click the
Next >button to proceed with the installation.

- Go will now appear as a Perspective.

Configuring the GoClipse Paths

That’s all.
Setting Up a Go Development Environment on Mac OS X
https://kenzo0107.github.io/en/2015/08/02/golang-development-on-macosx/
