protobuf-go/cmd/protoc-gen-go/testdata/proto2/enum.proto
Damien Neil 46abb57549 cmd/protoc-gen-go: generate enums
This produces exactly the same output (to the best of my ability to
determine) as github.com/golang/protobuf.

Change-Id: Ib60e7a836efb1eb0e5167b30458049ec239e7903
Reviewed-on: https://go-review.googlesource.com/134695
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2018-09-11 21:42:46 +00:00

48 lines
950 B
Protocol Buffer

// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
syntax = "proto2";
package goproto.protoc.proto2;
option go_package = "google.golang.org/proto/cmd/protoc-gen-go/testdata/proto2";
// EnumType1 comment.
enum EnumType1 {
// EnumType1_ONE comment.
ONE = 1;
// EnumType1_TWO comment.
TWO = 2;
}
enum EnumType2 {
option allow_alias = true;
duplicate1 = 1;
duplicate2 = 1;
}
message EnumContainerMessage1 {
// NestedEnumType1A comment.
enum NestedEnumType1A {
// NestedEnumType1A_VALUE comment.
NESTED_1A_VALUE = 0;
}
enum NestedEnumType1B {
NESTED_1B_VALUE = 0;
}
message EnumContainerMessage2 {
// NestedEnumType2A comment.
enum NestedEnumType2A {
// NestedEnumType2A_VALUE comment.
NESTED_2A_VALUE = 0;
}
enum NestedEnumType2B {
NESTED_2B_VALUE = 0;
}
}
}