Style Guide

1.   Use CamelCase (with an initial capital) for message names:

 

 

message SongServerRequest {

  required string song_name = 1;

} 
 

Using this naming convention for field names gives you accessors like the following:

 

 

public String getSongName() { ... }
public Builder setSongName(String v) { ... }
 

2.   Use CamelCase (with an initial capital) for enum type names and CAPITALS_WITH_UNDERSCORES for value names:

enum Foo {
  FIRST_VALUE = 1;
  SECOND_VALUE = 2;
}

 

 

 

3.  f your .proto defines an RPC service, you should use CamelCase (with an initial capital) for both the service name and any RPC method names:

 

service FooService {

  rpc GetSomething(FooRequest) returns (FooResponse);

} 
 

你可能感兴趣的:(style)