This pull request allows time values to be compared using ShouldEqual. More generally, it allows any two structs (or pointers) to be compared if they are of the same time underlying type and that type implements a method named Equal that receives another instance of its own type as an input argument and returns a bool indicating whether to receiver and the argument are considered equal.
time.Time satisfies the requirements above with it's Equal method:
func (t Time) Equal(u Time) bool
See the following issues for context leading up to this pull request:
This pull request allows time values to be compared using
ShouldEqual
. More generally, it allows any two structs (or pointers) to be compared if they are of the same time underlying type and that type implements a method namedEqual
that receives another instance of its own type as an input argument and returns abool
indicating whether to receiver and the argument are considered equal.time.Time satisfies the requirements above with it's
Equal
method:func (t Time) Equal(u Time) bool
See the following issues for context leading up to this pull request: