I am trying to generate a gRPC client that returns a self defined proto object. This is my current proto command
protoc -I.:../ --go_out=plugins=grpc:Muser/messages.proto=github.com/.../.../user:. messages.proto
and this is the error Muser/messages.proto=github.com/.../.../user:./: No such file or directory
However this command:
protoc -I.:../ --go_out=Muser/messages.proto=github.com/.../.../user:. messages.proto
and this one:
protoc -I.:../ --go_out=plugins=grpc:. messages.proto
work perfectly. The problem is when I try to use the plugins:grpc
part in conjunction to the path of the user/messages.proto
file.
Any clue what the problem might be?
Per the protoc documentation here: https://github.com/golang/protobuf#parameters
To pass extra parameters to the plugin, use a comma-separated parameter list separated from the output directory by a colon:
So I believe the right command would be: protoc -I.:../ --go_out=plugins=grpc,Muser/messages.proto=github.com/.../.../user:. messages.proto