github.com/psrajat/prototool@v1.3.0/internal/cmd/testdata/format-fix/foo.proto (about)

     1  // foo
     2  
     3  // bar
     4  
     5  syntax = "proto3"; // inline comment1
     6  
     7  // baz
     8  
     9  package foo; // inline comment3
    10  
    11  // bat
    12  // ban
    13  
    14  // comment9
    15  import "google/protobuf/timestamp.proto"; // inline comment9
    16  
    17  // comment11
    18  option java_multiple_files = true; //inline comment11
    19  // comment4
    20  option go_package = "issssoopb"; // inline comment4
    21  // comment5
    22  option java_outer_classname = "FdsddooProto"; // inline comment5
    23  
    24  // Baz is a baz.
    25  message Baz {
    26  
    27    int64 hello = 1;
    28  
    29    // unassociated comment
    30  
    31    // another unassociated comment
    32  
    33    google.protobuf.Timestamp timestamp = 3; /* inline c-style comment */
    34  
    35  
    36    map<string, int64> m = 11;
    37  
    38    oneof test_oneof {
    39      int64 foo1 = 8;
    40      string foo2 = 9;
    41      // comment18
    42    }
    43  
    44  }
    45  
    46  // Bat is a bat.
    47  message Bat {
    48    reserved 2 to 10, 1000 to 1100;
    49    reserved "foo";
    50    reserved "bar", "baz";
    51    // NestedBat is a nested bat.
    52    message NestedBat {
    53      int64 hello = 1;
    54    }
    55  }
    56  
    57  // Empty is an empty message.
    58  message Empty {
    59  }
    60  
    61  // Something is something.
    62  enum Something {
    63  // comment25
    64    SOMETHING_INVALID = 0; // inline comment25
    65  // comment27
    66    SOMETHING_UNSET = 1; // inline comment27
    67  // comment28
    68    SOMETHING_FOO = 2; // inline comment28
    69  }
    70  
    71  // Daylight is the daylight service.
    72  service Daylight {
    73    rpc Hello(Bat) returns (Empty) {
    74    } // inline comment23
    75    rpc Foo(Empty) returns (Bat); // inline comment24
    76  }