-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Many structs have an Equal method. time.Time is an example of one:
// Equal reports whether t and u represent the same time instant.
// Two times can be equal even if they are in different locations.
// For example, 6:00 +0200 and 4:00 UTC are Equal.
// See the documentation on the Time type for the pitfalls of using == with
// Time values; most code should use Equal instead.
func (t Time) Equal(u Time) bool {
if t.wall&u.wall&hasMonotonic != 0 {
return t.ext == u.ext
}
return t.sec() == u.sec() && t.nsec() == u.nsec()
}It would be beneficial if typeid.TypeId also had something similar. Happy to create a PR if this is accepted
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels