Skip to content

Setting up a Go development environment

Go has a pretty neat development environment, and its helpful to set up a standard GOPATH on your workstation up front.  This is what I do:

  • mkdir ~/go
  • add the following to .bashrc (or some file that configures your env on login)
    • export GOPATH=~/go
    • export PATH=$GOPATH/bin:$PATH

Now, after you log in, you can do things like:

go get -u github.com/monochromegane/the_platinum_searcher/...
go get -u github.com/schachmat/wego
(set up wego with forcast developer key)

There are lots of Go apps out there and if you just set up a global GOPATH, they are trivial to install and use anywhere on your system!  Generally your ~/go directory is also used for Go development projects, but that is a topic for another day.