Code generation makes vendoring a little more complicated as the generation tool also needs to be vendored to guarantee that the generated code stays compatible with other dependencies. As an example here is an extract of what a glide YAML file may look like:
package:github.com/foo/barimport:-package:github.com/goadesign/goavcs:gitversion:mastersubpackages:-client-design-design/apidsl-dslengine-goagen-middleware-package:golang.org/x/toolssubpackages:-go/ast/astutil-package:gopkg.in/yaml.v2 running glide install installs goagen in the vendor directory so that running:
cd ./vendor/github.com/goadesign/goa/goagen go build cd ../../../../../ always produces the same generator tool which can then be used with:
↧