Code Monkey home page Code Monkey logo

gom's Introduction

gom - Go Manager

Forked from github.com/mattn/gom by nic.dade@mistsys to fix and improve.

================

Build Status

Why

The go get command is useful. But we want to fix the problem where package versions are different from the latest update. Are you going to do go get -tags=1.1 ..., go get -tag=0.3 for each of them? We want to freeze package version. Ruby's bundle is awesome.

Installation

go get github.com/mattn/gom

Gomfile

gom 'github.com/mattn/go-runewidth', :tag => 'go1'
gom 'github.com/mattn/go-scan', :commit => 'ecb144fb1f2848a24ebfdadf8e64380406d87206'
gom 'github.com/daviddengcn/go-colortext'
gom 'github.com/mattn/go-ole', :goos => 'windows'

# Execute only in the "test" environment.
group :test do
    gom 'github.com/mattn/go-sqlite3'
end

# Execute only for the "custom_group" group.
group :custom_group do
    gom 'github.com/golang/lint/golint'
end

By default gom install install all packages, except those in the listed groups. You can install packages from groups based on the environment using flags (development, test & production) : gom -test install

Custom groups my be specified using the -groups flag : gom -test -groups=custom_group,special install

Usage

Create _vendor directory and bundle packages into it

gom install

Build on current directory with _vendor packages

gom build

Run tests on current directory with _vendor packages

gom test

Generate .travis.yml that uses gom test

gom gen travis-yml

You can always change the name relative to the current $GOPATH directory using an environment variable: GOM_VENDOR_NAME

$ # to use a regular $GOPATH/src folder you should specify GOM_VENDOR_NAME equal '.'
$ GOM_VENDOR_NAME=. gom <command>

Tutorial

Writing Gomfile and bundle

$ ls
main.go

$ gom gen gomfile

$ cat Gomfile
gom 'github.com/daviddengcn/go-colortext'
gom 'github.com/mattn/go-runewidth'

$ gom install
installing github.com/daviddengcn/go-colortext
installing github.com/mattn/go-runewidth

$ find \_vendor/src -maxdepth 2
\_vendor/src
\_vendor/src/github.com
\_vendor/src/github.com/daviddengcn
\_vendor/src/github.com/mattn

$ gom build

If you want to bundle specified tag, branch or commit

gom 'github.com/mattn/go-runewidth', :tag => 'tag_name'
gom 'github.com/mattn/go-runewidth', :branch => 'branch_name'
gom 'github.com/mattn/go-runewidth', :commit => 'commit_name'

If you want to bundle a repository that go get can't access

gom 'github.com/username/repository', :command => 'git clone http://example.com/repository.git'

If you want to change local repository directory with commend 'git clone', also skipdep and insecure, which is useful in internal network environment.

gom 'github.com/username/repository', :private => 'ture', :target => 'repository', insecure=>'true', skipdep=>'true' 

Todo

  • Documentation

Author

Yasuhiro Matsumoto [email protected]

License

MIT: http://mattn.mit-license.org/2013

gom's People

Contributors

cubicdaiya avatar darthsim avatar hnakamur avatar jabley avatar jawsthegame avatar kevinhankens avatar koron avatar mattn avatar michaelmior avatar nono avatar nsd20463 avatar okzk avatar orofarne avatar owlycode avatar prasincs avatar robert-zaremba avatar ruitao avatar shawnps avatar smira avatar sudharsh 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.