godev eases your Go development by providing functions to manage your GOPATH
and source directories.
Some main examples:
-
Start a new workspace for development using
godev start$ godev start my_workspace
This will create a directory called
my_workspacein yourGODEV_ROOT(see below), containingsrc,bin, andpkg. Ifmy_workspacealready exists, it only checks whether the latter three directories have been created. If you also pass the-aflag,my_workspace's path will be prepended to the existingGOPATH. Otherwise,GOPATHwill exclusively point tomy_workspace. -
Revert to system
GOPATH$ godev stop
-
Symlink directories into
srcin your active workspaceIt's easy to have your real source directories anywhere outside
GOPATHand still be able to do proper imports and/or builds. You only need to symlink them into the active workspace'ssrcdirectory usinggodev add:$ godev add my_src my_other_src
Run godev help for the complete usage listing.
-
Checkout from the repo, for example into
~$ git clone git://github.com/bow/godev.git ~ -
Create a
GODEV_ROOTdirectory. This will be the directory containing all your workspaces. A good example would be~/.godev$ mkdir -p ~/.godev -
Add the following entry to your
.bashrc(or something similar)$ echo "export GODEV_ROOT=~/.godev" >> ~/.bashrc # path to previously set GODEV_ROOT $ echo "source ~/godev/godev.sh" >> ~/.bashrc # path to main godev file
-
Reload your
.bashrc$ source ~/.bashrc
-
And you're set!
See the attached license in godev.sh