mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2024-12-29 12:17:48 +00:00
types/dynamicpb: fix message Zero return type to read-only
Changes the message Zero return type to be read-only by omitting internal known map. Change-Id: I1c1191a125df74251be3d8bb70f4b06c1ff57070 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/223857 Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
This commit is contained in:
parent
2ce1ca9e3f
commit
9d397869d8
@ -323,7 +323,7 @@ func NewMessageType(desc pref.MessageDescriptor) pref.MessageType {
|
||||
}
|
||||
|
||||
func (mt messageType) New() pref.Message { return NewMessage(mt.desc) }
|
||||
func (mt messageType) Zero() pref.Message { return NewMessage(mt.desc) }
|
||||
func (mt messageType) Zero() pref.Message { return &Message{typ: messageType{mt.desc}} }
|
||||
func (mt messageType) Descriptor() pref.MessageDescriptor { return mt.desc }
|
||||
|
||||
type emptyList struct {
|
||||
|
Loading…
Reference in New Issue
Block a user