Closed sima-fastly closed 3 years ago
Hey, thanks for the report. This looks like a duplicate of #244. To workaround this for now I would suggest using source mode. Closing.
thanks for the note @codyoss we need to mockgen based on a set of go files as not all type defs are in one go file in our project. is there a way to source from a list of go files?
we found a way to work around it by removing type refs thanks
mockgen is generating a mocked file with an
google.golang.org/grpc/internal/status
import which results in an “Use of internal package is not allowed” errExpected behavior is to gen a file with
google.golang.org/grpc/status
importthis issue started happening when google.golang.org/protobuf was updated to 1.26.0 google.golang.org/grpc package was updated to 1.37.0 golang/mock was updated to 1.5.0
gomock mode is reflect go version go1.16.3 darwin/amd64
here is the mockgen cmd I am running
//go:generate mockgen -destination mocks/audit_mock.go -package mocks ./provisioning/internal/audit Auditable
I tried using -imports flag to specify which non-internal files to be imported but the imports value is being ignored and I still see the /internal file is being imported