After running protoc command I'm getting below error.
google/protobuf/descriptor.proto: File not found.
google/api/annotations.proto: Import "google/protobuf/descriptor.proto" was not found or had errors. google/api/annotations.proto:28:8: "google.protobuf.MethodOptions" is not defined. currency.proto: Import "google/api/annotations.proto" was not found or had errors.
My protoc version is - libprotoc 3.0.0
Here is my proto file code..
syntax = "proto3";
import "google/api/annotations.proto";
service Currency {
// GetRate returns the exchange rate for the two provided currency codes
rpc GetRate(RateRequest) returns (RateResponse) {
option (google.api.http) = {
post: "/v1/convert",
body:"*"
};
};
}
....
....
I'm running below command - protoc -I proto/ proto/*.proto --go_out=plugins=grpc:pb
It works fine if I remove the import of google/api/annotations.proto and option... but when I import the google/api/annotations.proto and compile it using protoc, it gives me error.
