A small command line utility for fully vendoring module dependencies
Because Google have a different idea of what vendoring means than the rest
of us. If you use the built-in
go mod vendor
command, it will only cherry pick certain files for inclusion
in the vendor folder. This can cause problems when using
Cgo because it ignores C files that are
not in the package
directory.
Tests and examples for dependencies are ignored too.
This tool copies the entire dependency tree into the vendor folder like every
other package manager does and how every sane developer would expect it to
work. It can be used safely in the $GOPATH
or elsewhere.
This package expects that the new module system introduced in v1.11 is being used.
This tool fully copies all files from your project's imported dependencies
into the vendor
folder. This allows you to:
- Always have access to all files in your dependencies, even if they go offline
- Always be able to build your project on a disconnected computer
- Always be able to run the tests or benchmarks for all your dependencies
- v1.11+
$ go get github.com/nomad-software/vend
$ cd $GOPATH/mypackage
$ vend
Run the following command for help.
$ vend -help