Ive been playing with Go quite a bit lately, and found there to be quite a bit of boilerplate to get started with a new project. So I thew together gofish. Its a virtualenvwrapper inspired wrapper for working on Go projects in the Fish shell.
If youve used virtualenvwrapper (or virtualfish) the commands will be familiar to you.
To create a new go workspace:
$ mkgoworkspace project-name
This will created a project structure that looks like this:
The default namespace will be the currect users username, but that can be overridded by setting the
GOFISH_NAMESPACE environment variable:
$ set -x GOFISH_NAMESPACE github.com/zackkitzmiller; and mkgoworkspace project-name
To switch the
$ goon project-name
To deactive a workspace completely:
The various commands all emit events, so you can listen for them in your fish config. The available events to listen to are:
The following example would send a growl notification on workspace activation
function announce –on-event gofish_workspace_activated
command growlnotify -m \”Workspace: \” (basename $GO_CURRENT_WORKSPACE) \” activated\” -n gofish
The following global environment variables will be available after a successful workspace activation:
$GOPATH - as expected
This is still just a work in progress. Let me know what you think. And as always, pull requests welcome.
multiple modules in same workspace