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