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.
Yup, you can use gvm:
https://github.com/moovweb/gvm
If you've ever used rvm for ruby, it's similar to that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With