func equal(in protoiface.EqualInput) protoiface.EqualOutput { … } // equalMessage is a fast-path variant of protoreflect.equalMessage. // It takes advantage of the internal messageState type to avoid // unnecessary allocations, type assertions. func equalMessage(mx, my protoreflect.Message) bool { … } func equalValue(fd protoreflect.FieldDescriptor, vx, vy protoreflect.Value) bool { … } // Mostly copied from protoreflect.equalMap. // This variant only works for messages as map types. // All other map types should be handled via Value.Equal. func equalMessageMap(mx, my protoreflect.Map) bool { … } // Mostly copied from protoreflect.equalList. // The only change is the usage of equalImpl instead of protoreflect.equalValue. func equalMessageList(lx, ly protoreflect.List) bool { … } // equalUnknown compares unknown fields by direct comparison on the raw bytes // of each individual field number. // Copied from protoreflect.equalUnknown. func equalUnknown(x, y protoreflect.RawFields) bool { … }