Set up an environment for your Go project
Python Makefile
Latest commit 3ea1a3d Aug 24, 2016 @pwoolcoc 1.7 release

Build Status

goenv - Set up a Golang environment

I got tired of manually setting my GOPATH when I went from one project to another, so I wrote a small utility to set up my environment for me. It is similar in spirit to Python's virtualenv, though it does less, and does it a little differently.

The main difference is that instead of an 'activate' script that sets up your environment, this opens up a new subshell for you to work in. It will also download and install the version of Go that you want it to.


Currently goenv is written in python, so installation is a simple pip install away:

$ sudo pip install pygoenv


$ cd /path/to/project
$ echo $GOPATH

# simplest usage
$ goenv
Extracting /home/user/.cache/goenv/go1.2.linux-amd64.tar.gz to /home/user/.config/goenv/dists/1.2
(golang-1.2) $ echo $GOPATH

# You don't have to download a new go tarball every time...
$ goenv
Using existing tarball
Go version 1.2 already exists, skipping extract
(golang-1.2) $

# specify Golang version
$ goenv --go-version 1.1
Extracting /home/user/.cache/goenv/go1.1.linux-amd64.tar.gz to /home/user/.config/goenv/dists/1.1
(golang-1.1) $



twitter: @pauldwoolcock


irc: duncan @