https://github.com/zh/virgo
Create Golang virtual environments
https://github.com/zh/virgo
Last synced: 9 months ago
JSON representation
Create Golang virtual environments
- Host: GitHub
- URL: https://github.com/zh/virgo
- Owner: zh
- License: mit
- Created: 2013-12-04T05:43:46.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-12-04T05:44:11.000Z (over 12 years ago)
- Last Synced: 2025-03-24T14:38:24.294Z (over 1 year ago)
- Language: Shell
- Size: 97.7 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# virgo - Create Golang virtual environments
## Overview
Very simple command line tool, inspired by Python's [virtualenv](https://pypi.python.org/pypi/virtualenv).
## Install
Copy the two included in the distribution files, _virgo_ and _goactivate_ to some directory and fix the __VIDIR__ line inside _virgo_:
VIDIR="${HOME}/bin"
## Usage
Create new virtual environment with
$ virgo ./new_proj
This will create the basic structure for a Go language project:
bin/ # command line tools
pkg/ # compiled binaries
src/ # sources
Go to the new directory and activate the virtual environment:
$ cd ./new_proj && source ./bin/activate
Activation will change the __GOPATH__ to the current directory and also include the project _bin/_ in the __PATH__:
GOPATH=/path/to/your/project
PATH=$GOPATH/bin:$PATH
When you finish working with the virtual environment, you can go back to your default Go language settings with:
$ deactivate
This will restore the old __GOPATH__ and __PATH__ .
## Author
* [Stoyan Zhekov](https://github.com/zh)
## License
[MIT License](http://opensource.org/licenses/MIT)
## More
* Code: