Generally:
protoc -flag param:param:param target-file.proto --plugin_flag=key=value,key=value:./dest/
For example:
protoc -I .:.. foo.proto --go_out=plugins=grpc,paths=source_relative:.
This means:
- Run protoc on
foo.proto
- Any other proto files in the current directory or the parent directory should be available for import.
- Generate a
foo.pb.go
file for gRPC usingprotoc-gen-go
.