Strategies and tools for vendoring dependencies

Initially, Go had no support for vendoring packages. This made sense at the time, as Google, the primary user of Go, would host all of their package dependencies in a single repository (commonly referred to as a mono-repo).

However, as the Go community began growing and more and more companies began porting their code bases to Go, dependency management became an issue. With the release of Go 1.5, the Go team added experimental support for vendoring folders. Users could enable this feature by defining an environment variable named GO15VENDOREXPERIMENT.

When this feature is enabled, each time the Go compiler attempts to resolve an import, it will first check whether the imported package exists ...

Get Hands-On Software Engineering with Golang now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.