golang / mock

GoMock is a mocking framework for the Go programming language.
Apache License 2.0
9.3k stars 610 forks source link

grpc stream mock #272

Closed LucaPaterlini closed 4 years ago

LucaPaterlini commented 5 years ago

hello while trying to mock this protocol I got this error it seems to me that it's not able to find the gRPC package

mockgen -source=/home/pater92/Documents/work/Interview/Sea_LucaPaterlini/src/pipeProto/pipe.pb.go Transfer -destination=src/pipeProto/p_mock.go -imports grpc=google.golang.org/grpc 2019/03/09 18:37:33 Loading input failed: /home/pater92/Documents/work/Interview/Sea_LucaPaterlini/src/pipeProto/pipe.pb.go:193:2: unknown embedded interface grpc.ClientStream

how to sort this?

thanks in advance

https://we.tl/t-EdBeiZocxW

I have added the proto in a zip

Tk in advance lp

poy commented 5 years ago

Hey! Sorry for the slow response. I don't feel great about downloading a zip file and opening it up. Any chance this is hosted via Github or something similar?

Are you using go modules? It doesn't look like pipeProto/pipe.pb.go is in the proper GOPATH.

codyoss commented 4 years ago

Closing due to age with no response. If you would like to put an example up on Github please feel free to reopen!