by ohmystack (firstname.lastname@example.org)
gotool is a command-line tool for Golang to help the developer to source the workspace, and unsource it.
It is greatly inspired by the
virtualenv from Python.
But here is only a small script. Cool, right?
- Activate/deactivate the current path as a
- Add the relevant 'bin' directory into
- Auto detect Godeps path
$PS1support for zsh
We will have more feature in the future. Please tell me if you have a good idea.
$ cp gotool /usr/local/bin/gotool
$ gotool -h Golang Developer Tool Usage: source gotool [a|activate] [d|deactivate|exit]
Activate current path, adding it into
$GOPATH and its
cd <your-workspace> source gotool activate # OR use 'a' for short source gotool a
You will see a prefix, the name of this directory, in front of your PS1.
If the path is under
Godeps/_workspace/, the prefix will be the project name.
Then, you can check your
source gotool deactivate # OR use 'd' for short source gotool d # OR source gotool exit