github.com/whiteCcinn/protobuf-go@v1.0.9/cmd/protoc-gen-go/testdata/comments/comments.proto (about)

     1  // Copyright 2018 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  syntax = "proto2";
     6  
     7  // COMMENT: package goproto.protoc.comments;
     8  package goproto.protoc.comments;
     9  
    10  option go_package = "github.com/whiteCcinn/protobuf-go/cmd/protoc-gen-go/testdata/comments";
    11  
    12  // COMMENT: Enum1.Leading
    13  enum Enum1 {
    14    // COMMENT: FOO.Leading
    15    FOO = 0; // COMMENT: FOO.InlineTrailing
    16    // COMMENT: BAR.Leading
    17    BAR = 1;
    18    // COMMENT: BAR.Trailing1
    19    // COMMENT: BAR.Trailing2
    20  
    21    // COMMENT: Enum1.EndBody
    22  }
    23  
    24  // COMMENT: Message1.Leading
    25  message Message1 {
    26    // COMMENT: Message1A.Leading
    27    message Message1A {
    28    } // COMMENT: Message1A.Trailing
    29  
    30    // COMMENT: Message1B
    31    message Message1B {
    32    }
    33  
    34    // COMMENT: Field1A.Leading
    35    optional string Field1A = 1; // COMMENT: Field1A.Trailing
    36  
    37    // COMMENT: Oneof1A.Leading
    38    oneof Oneof1a {
    39      // COMMENT: Oneof1AField1.Leading
    40      string Oneof1AField1 = 2; // COMMENT: Oneof1AField1.Trailing
    41    } // COMMENT: Oneof1A.Trailing
    42  
    43    extensions 100 to max;
    44  } // COMMENT: Message1.Trailing
    45  
    46  // COMMENT: Extend
    47  extend Message1 {
    48    // COMMENT: Extension.Leading
    49    optional Message1 extension = 100; // COMMENT: Extension.Trailing
    50  }
    51  
    52  // COMMENT: Message2
    53  message Message2 {
    54    // COMMENT: Message2A
    55    message Message2A {
    56    }
    57  
    58    // COMMENT: Message2B
    59    message Message2B {
    60    }
    61  }