Create Golang virtual environments
Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
goactivate
virgo

README.md

virgo - Create Golang virtual environments

Overview

Very simple command line tool, inspired by Python's virtualenv.

Install

Copy the two included in the distribution files, virgo and goactivate to some directory and fix the VIDIR line inside virgo:

VIDIR="${HOME}/bin"

Usage

Create new virtual environment with

$ virgo ./new_proj

This will create the basic structure for a Go language project:

bin/   # command line tools
pkg/   # compiled binaries 
src/   # sources    

Go to the new directory and activate the virtual environment:

$ cd ./new_proj && source ./bin/activate

Activation will change the GOPATH to the current directory and also include the project bin/ in the PATH:

GOPATH=/path/to/your/project
PATH=$GOPATH/bin:$PATH

When you finish working with the virtual environment, you can go back to your default Go language settings with:

$ deactivate

This will restore the old GOPATH and PATH .

Author

License

MIT License

More