Vendoring all dependencies is essential to have a go get-able package.
Tools needed:
- dep dependency manager
make deps
will install them, in case they are missing
If you write new features which imports a new library, you have to vendor it:
dep ensure -v -add github.com/Masterminds/cookoo/web
Sometimes you have an unmerged PR, or a change which you don't even want to push upstream. In those cases you have a GH fork, and want use that instead of the origin.
Gopkg.toml:
[[constraint]]
name = "github.com/kubicorn/kubicorn"
branch = "master"
source = "github.com/banzaicloud/kubicorn"
If you are using a specific branch/tag like v1.2.0 in Gopkg.toml, just change it to the new version.
Perform an update:
dep ensure -v -update github.com/your/upgradable/package
This project was previously using dep. But dep ensure
couldn't handle k8s.io dependencies.
This project was previously using glide. But we returned to dep because seems like glide is becoming dormant, and seems like dep now can handle k8s.io dependencies.
see GH issues: