Closed
Description
Steps you follow to reproduce the error:
- When NOT using protobuf APIv2, I can't rely on the google.golang.org/genproto package for the protoc-compiled version of the annotations.proto, http.proto, and httpbody.proto files. Since I'm using grpc, I'm forced to APIv1 for now, which means I need to compile them myself.
protoc --proto_path . --go_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor:. google/api/*.proto
- When I compile against the generated files, I get an error from Go that there is more than one package in the same directory.
- This is totally consistent with the Buf style guide, which also suggests all .proto files in the same directory should have the same go_package.
Simple fix is to adjust the go_package line in httpbody.proto to match the go_package of the other two protos in google/api
Metadata
Metadata
Assignees
Labels
No labels