Equal reports whether two messages are equal. If two messages marshal to the same bytes under deterministic serialization, then Equal is guaranteed to report true. Two messages are equal if they are the same protobuf message type, have the same set of populated known and extension field values, and
(x, y Message)
| 158 | // Maps are equal if they have the same set of keys, where the pair of values |
| 159 | // for each key is also equal. |
| 160 | func Equal(x, y Message) bool { |
| 161 | return protoV2.Equal(MessageV2(x), MessageV2(y)) |
| 162 | } |
| 163 | |
| 164 | func isMessageSet(md protoreflect.MessageDescriptor) bool { |
| 165 | ms, ok := md.(interface{ IsMessageSet() bool }) |