protobuf-go/cmd/protoc-gen-go/testdata
Joe Tsai dbab6c06ee cmd/protoc-gen-go: generate Enum method even on proto3
A proto2 message can reference a proto3 enum. It is currently cumbersome
to set proto3 enums in proto2 messages. Add the Enum method in all situations
to support this situation. It also removes yet another point of divergence
between proto2 and proto3.

We could consider removing this method if Go ever gets generics,
but that hypothetical future is long ways away.

Change-Id: Ib83bc87e46b49f3271b90bacb2893bb8e278e4f2
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/177257
Reviewed-by: Damien Neil <dneil@google.com>
2019-05-17 06:27:54 +00:00
..
annotations all: change module to google.golang.org/protobuf 2019-05-14 17:28:29 +00:00
comments cmd/protoc-gen-go: generate Enum method even on proto3 2019-05-17 06:27:54 +00:00
extensions cmd/protoc-gen-go: generate Enum method even on proto3 2019-05-17 06:27:54 +00:00
fieldnames all: change module to google.golang.org/protobuf 2019-05-14 17:28:29 +00:00
import_public all: change module to google.golang.org/protobuf 2019-05-14 17:28:29 +00:00
imports cmd/protoc-gen-go: generate Enum method even on proto3 2019-05-17 06:27:54 +00:00
issue780_oneof_conflict all: change module to google.golang.org/protobuf 2019-05-14 17:28:29 +00:00
nopackage all: change module to google.golang.org/protobuf 2019-05-14 17:28:29 +00:00
proto2 all: change module to google.golang.org/protobuf 2019-05-14 17:28:29 +00:00
proto3 cmd/protoc-gen-go: generate Enum method even on proto3 2019-05-17 06:27:54 +00:00
gen_test.go all: change module to google.golang.org/protobuf 2019-05-14 17:28:29 +00:00
go.mod types: remove stub packages 2019-05-16 22:06:16 +00:00