I saw two different ways to declare a gRPC service using Protobuf v3. In some code, there is an end to the rpc line with a semicolon (for example, the current proto3 documentation):
service SearchService { rpc Search (SearchRequest) returns (SearchResponse); }
The other code has the end of the rpc line with {} :
service Greeter { rpc SayHello (HelloRequest) returns (HelloReply) {} }
Both of these files are compiled with the protoc v3.0.0-alpha-2 compiler and produce the same (go) code.
What is the difference between the two syntaxes?
source share