- Install Golang
https://golang.org/dl/
wget https://storage.googleapis.com/golang/go1.5.1.darwin-amd64.pkg
cd
echo '' >> .bash_profile
echo 'export PATH=$PATH:/usr/local/go/bin' >> .bash_profile
source .bash_profile
-
install glide https://github.com/Masterminds/glide
-
Get libraries
export GOPATH=/Users/dhong/Documents/workspace/go
mkdir $GOPATH
cd $GOPATH
cd src/tz.com/tz-golang-graphite
glide up
- run IDE
3-1 golang intellij
- get intellij
https://www.jetbrains.com/idea/ - Preference > Plugins > Browse repositories > Manage repositories > add
https://plugins.jetbrains.com/plugins/alpha/5047
Select "Go" > install plugin > restart - context menu > open module settings
> Project > Project SDK > Go 1.5.1
> Platform Setttings > SDKs, add "go sdk"
"/usr/local/go"
> Project Setttings > Libraries, add "java"
select all folders in /Users/dhong/Documents/go/src > Classes
> Preference > Go Libraries >
Global Libraries > /Users/dhong/Documents/go
Project Libraries > /Users/dhong/Documents/workspace/dhc4 - Change the module type to Go project
3-2 golang eclipse
- install Eclipse IDE for Java EE Developers
https://www.eclipse.org/downloads/?osType=macosx - install jdk8
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html - plugin installation (goclipse)
add repository: http://goclipse.github.io/releases/
Select goclipse in available software - install Eclipse CDT (C/C++ Development Tooling)
- install gdb
brew install gdb
export PATH=/usr/local/bin:$PATH - preferences in eclipse
GOROOT: /usr/local/go
GOOS: darwin
GOARCH: amd64
GOPATH: /Users/dhong/Documents/go - run eclipse with sudo
cd /Applications/Eclipse.app/Contents/MacOS
export GOPATH=/Users/dhong/Documents/go
export PKG_CONFIG_PATH=/usr/share/pkgconfig/lib/pkgconfig
sudo eclipse