GithubHelp home page GithubHelp logo

glen's Introduction

glen

Go environment manager

Installation

$ git clone https://github.com/astronoka/glen.git ~/.glen
$ ln -s ~/.glen/glen.sh ~/bin/glen
$ glen version
0.2.0

Usage

Usage: glen <cmd>

Commands:

version                         Print glen version
help                            Output help text
install <version>               Install the version passed (ex: go1.5.3)
uninstall <version>             Delete the install for <version>
use <version>                   Activate specified <version>
list                            List installed versions
tags                            List available versions (tags)

env list                        List environments
env create <envname> <version>  Create environment
env delete <envname>            Delete environment
env use    <envname>            Activate environment

vendor init <version>           Initialize current directory as workspace
vendor use                      Activate current directory as workspace

tools                           Install develop tools (goimports,gorename...)

Basic mode

[astronoka ~]$ glen use go1.6
(glen:go1.6)[astronoka ~]$ go env
...
GOPATH="/Users/astronoka/.glen/installed/go1.6/glen"
...
GOROOT="/Users/astronoka/.glen/installed/go1.6"
...

Env mode

[astronoka ~]$ glen env list
[astronoka ~]$ glen env create awesomeapp go1.6
[astronoka ~]$ glen env list
awesomeapp
[astronoka ~]$ glen env use awesomeapp
(awesomeapp:go1.6)[astronoka ~]$ go env
...
GOPATH="/Users/astronoka/.glen/env/awesomeapp"
...
GOROOT="/Users/astronoka/.glen/installed/go1.6"
...
(awesomeapp:go1.6)[astronoka ~]$ exit
[astronoka ~]$ glen env delete awesomeapp
[astronoka ~]$ glen env list

Vendor mode

[astronoka ~]$ mkdir amazingapp
[astronoka ~]$ cd amazingapp/
[astronoka amazingapp]$ glen vendor init go1.6
create vendor directory
create glenrc
successfully initialized: /Users/astronoka/amazingapp
[astronoka amazingapp]$ ls
glenrc vendor
[astronoka amazingapp]$ glen vendor use
(amazingapp:go1.6)[astronoka amazingapp]$ go env
...
GOPATH="/Users/astronoka/amazingapp/vendor"
...
GOROOT="/Users/astronoka/.glen/installed/go1.6"
...

Install develop tools

(glen:go1.6)[astronoka ~]$ glen tools
go get github.com/nsf/gocode into /Users/astronoka/.glen/installed/go1.6/glen
go get github.com/alecthomas/gometalinter into /Users/astronoka/.glen/installed/go1.6/glen
go get golang.org/x/tools/cmd/goimports into /Users/astronoka/.glen/installed/go1.6/glen
go get github.com/rogpeppe/godef into /Users/astronoka/.glen/installed/go1.6/glen
go get golang.org/x/tools/cmd/oracle into /Users/astronoka/.glen/installed/go1.6/glen
go get golang.org/x/tools/cmd/gorename into /Users/astronoka/.glen/installed/go1.6/glen
go get github.com/golang/lint/golint into /Users/astronoka/.glen/installed/go1.6/glen
go get github.com/kisielk/errcheck into /Users/astronoka/.glen/installed/go1.6/glen
go get github.com/jstemmer/gotags into /Users/astronoka/.glen/installed/go1.6/glen

Inspired

glen's People

Contributors

astronoka avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.