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 inside the vendor folder and use it if found; otherwise, it will proceed, as usual, to scan each entry in the $GOPATH looking for the package...