I've previously used Python tools like virtualenv
and virtualenvwrapper
in Python projects, but now I'm working on a project in Go so I'd like a general tool to switch environment variables when I do something like
workon myproject
....
deactivate myproject
I especially like the workflow of virtualenv-wrapper
with pre and post activation scripts in which I can preactivate.sh
export MYVAR=xxx
and postactivate
unset MYVAR
The tools I've mentioned seem to be centered around Python and pip, but since my project is in Go, I don't know if its kosher for me to use Python tools that happen to provide environment variable management features. Anything more general purpose you would suggest and is not hard to set up?
This question is not necessarily Go lang specific.