-
make mockgen
returnsimported package collision: "backoff" imported twice
mockgen
must use reflect mode to understand the interface. This error will likely to happen if we want to generate mock for interface in generated*.pb.go
files. For example, we want to generate mock forURLShortenerService_StreamAllURLServer
inproto/indrasaputra/shortener/v1/shortener_grpc.pb.go
. We will get that reported error. To resolve this issue, run mockgen in reflect mode.$ cd proto/indrasaputra/shortener/v1 $ mockgen -destination=<your-destination.go> . URLShortenerService_StreamAllURLServer