I'm using Go modules, and I use vendoring mode, as it speed up 2x my CI.
I do:
go mod vendor
go build -mod=vendor ...
and I can build my app without any issue.
But when I want to use go get
, for instance to install golint
:
go get -u golang.org/x/lint/golint
It will download all my project dependencies again, not just golint.
If I try:
go get -mod=vendor -u golang.org/x/lint/golint
I get:
go get: disabled by -mod=vendor
Lint will be used in my dev docker image, but not in the prod one, so I don't want to add it to go.mod
What can I do about it ?