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>
请发表评论