| commit | 0e26464828f3bca5799a51bf4d3e3b56f31d1bc0 | [log] [tgz] |
|---|---|---|
| author | Filippo Valsorda <filippo@cloudflare.com> | Sat Sep 05 03:07:53 2015 +0100 |
| committer | Filippo Valsorda <filippo@cloudflare.com> | Sat Sep 05 03:07:53 2015 +0100 |
| tree | b5dd8e07c937e2e80865b4a3e8b27677cef019ef | |
| parent | 1c730f1652ab620fdc7209377eaad14da0ebda82 [diff] |
Update documentation
gvt is a simple Go vendoring tool made for the GO15VENDOREXPERIMENT.
It's based entirely on gb-vendor.
You run gvt fetch when you would run go get. gvt downloads packages to ./vendor/.... With GO15VENDOREXPERIMENT=1 set the compiler will find and use those dependencies without import path rewriting. gvt works recursively as you would expect, and lets you update vendored dependencies. It also writes a manifest to ./vendor/manifest.
Packages whose dependencies are vendored with gvt are go build-able and go get-able by Go 1.5 with GO15VENDOREXPERIMENT=1 set.
go get -u github.com/FiloSottile/gvt
$ gvt fetch github.com/fatih/color
2015/09/05 02:38:06 fetching recursive dependency github.com/mattn/go-isatty
2015/09/05 02:38:07 fetching recursive dependency github.com/shiena/ansicolor
$ tree -d
.
└── vendor
└── github.com
├── fatih
│ └── color
├── mattn
│ └── go-isatty
└── shiena
└── ansicolor
└── ansicolor
9 directories
$ cat > main.go
package main
import "github.com/fatih/color"
func main() {
color.Red("Hello, world!")
}
$ export GO15VENDOREXPERIMENT=1
$ go build .
$ ./hello
Hello, world!
$ gvt update github.com/fatih/color
There are many Go vendoring tools, but they all have some subset of the following problems
go get