protobuf-go/cmd/protoc-gen-go/internal_gengo
Damien Neil a485fbd353 reflect/protoreflect: add FieldDescriptor.DefaultEnumValue method
Default values for enums are specified by name, not number. An enum
may contain multiple values with different names but the same number.
Representing the default as a protoreflect.Value containing an EnumNumber
can discard information.

Add a method returning the EnumValueDescriptor.

Change-Id: If8beee3f81d41c4f9af45423252603b86949c7a5
Reviewed-on: https://go-review.googlesource.com/c/145158
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2018-10-29 15:59:23 +00:00
..
main.go reflect/protoreflect: add FieldDescriptor.DefaultEnumValue method 2018-10-29 15:59:23 +00:00
oneof.go protogen: move comment generation into protogen 2018-10-17 21:03:49 +00:00