Go Manager

Go Manager - bundle for go

  • 所有者: mattn/gom
  • 平台:
  • 许可证:
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

gom - Go Manager

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 command 'git clone', also skipdep and insecure, which is useful in internal network environment.

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

Todo

  • Documentation

Author

Yasuhiro Matsumoto mattn.jp@gmail.com

License

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

主要指标

概览
名称与所有者mattn/gom
主编程语言Go
编程语言Go (语言数: 2)
平台
许可证
所有者活动
创建于2013-09-11 02:08:59
推送于2019-07-26 06:31:14
最后一次提交2019-07-26 15:31:13
发布数0
用户参与
星数1.4k
关注者数34
派生数91
提交数202
已启用问题?
问题数34
打开的问题数11
拉请求数43
打开的拉请求数3
关闭的拉请求数9
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?