github.com/whiteCcinn/protobuf-go@v1.0.9/cmd/protoc-gen-go/testdata/proto2/enum.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  package goproto.protoc.proto2;
     8  
     9  option go_package = "github.com/whiteCcinn/protobuf-go/cmd/protoc-gen-go/testdata/proto2";
    10  
    11  // EnumType1 comment.
    12  enum EnumType1 {
    13    // EnumType1_ONE comment.
    14    ONE = 1;
    15    // EnumType1_TWO comment.
    16    TWO = 2;
    17  }
    18  
    19  enum EnumType2 {
    20    option allow_alias = true;
    21    duplicate1 = 1;
    22    duplicate2 = 1;
    23  
    24    reserved "RESERVED1";
    25    reserved "RESERVED2";
    26    reserved 2, 3;
    27  }
    28  
    29  message EnumContainerMessage1 {
    30    optional EnumType2 default_duplicate1 = 1 [default=duplicate1];
    31    optional EnumType2 default_duplicate2 = 2 [default=duplicate2];
    32  
    33    // NestedEnumType1A comment.
    34    enum NestedEnumType1A {
    35      // NestedEnumType1A_VALUE comment.
    36      NESTED_1A_VALUE = 0;
    37    }
    38  
    39    enum NestedEnumType1B {
    40      NESTED_1B_VALUE = 0;
    41    }
    42  
    43    message EnumContainerMessage2 {
    44      // NestedEnumType2A comment.
    45      enum NestedEnumType2A {
    46        // NestedEnumType2A_VALUE comment.
    47        NESTED_2A_VALUE = 0;
    48      }
    49  
    50      enum NestedEnumType2B {
    51        NESTED_2B_VALUE = 0;
    52      }
    53    }
    54  }