mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-02-23 15:40:45 +00:00
Ensure that EnumOf, EnumDescriptorOf, EnumTypeOf, ProtoMessageV1Of, ProtoMessageV2Of, MessageOf, MessageDescriptorOf, and MessageTypeOf all return nil if passed a nil interface. This parallels the behavior of reflect.TypeOf or reflect.ValueOf, which return nil or an invalid value rather than panicking. Change-Id: I461f15542f16cb0922d627bca6fcad5fc27d87e2 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/213239 Reviewed-by: Damien Neil <dneil@google.com>