GetStream / vg

Virtualgo: Easy and powerful workspace based development for go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Override virtualgoroot (~/.virtualgo)?

glasser opened this issue · comments

We have a project that uses a variety of home-grown shell scripts to provide a similar experience to vg. I'd like to replace it with vg.

One nice feature of our project is that you can check it out anywhere and it will work immediately (as long as you run our shell wrapper, which works well with direnv). We store the equivalent to the ~/.virtualgo/V directory inside a gitignored directory in the repo itself. That way you can have multiple checkouts and they just work.

So to port to vg our scripts (we'd still have direnv scripts because we set up non-Go environments as well) would like to be able to just use a fixed environment name and a virtualgoroot that's not global, rather than a global virtualgoroot and a variable environment name.

It looks like we should be able to just define, say, $VIRTUALGOROOT, and use it instead of ~/.virtualgo in the shell scripts and utils.Virtualgoroot. Is that a PR you'd take?

If you can create a PR I'll gladly merge it. Be sure that it still defaults to ~/.virtualgo though if not set.