You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 27, 2023. It is now read-only.
I have a Go project that uses modules and stores its dependencies in the vendor/ folder. In our CI pipeline, we install gomock and run it via //go:generate mockgen -source ./foo/service.go -destination gen/foo/mocks.go -package foo.
gomock then tries to download all dependencies from its source repositories instead of using the vendor folder. This is problematic for us as we have some dependencies in a private repo that uses self signed certificates. Thats why we want to use the vendor/ folder.
We execute go generate -mod vendor to trigger the generation, we tried prefixing it with GOFLAGS=-mod=vendor and using -build_flags "-mod vendor" , but gomock always downloads all dependencies.
How can we tell gomock to look for dependencies in the vendor folder first before downloading them? Thanks!
jlourenc, matyat, chrisforrette, veqryn and rafaeljusto