...

Text file src/google.golang.org/protobuf/cmd/protoc-gen-go/testdata/proto2/enum.proto

Documentation: google.golang.org/protobuf/cmd/protoc-gen-go/testdata/proto2

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

View as plain text