mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-26 09:35:33 +00:00
e6f060fdac
Add support for basic equality comparison of messages. Messages are equal if they have the same type and marshal to the same bytes with deterministic serialization, with some exceptions: - Messages with different registered extensions are unequal. - NaN is not equal to itself. Unlike the v1 Equal, a nil message is equal to an empty message of the same type. Change-Id: Ibabdadd8c767b801051b8241aeae1ba077e58121 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/174277 Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>