You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we permitted == on structs in an earlier release of Go, we accidentally made
time.Time values comparable this way. However, because time.Time values contain a
*Location pointer, it's possible (and easy) to have two time.Times represent the same
instant, even in the same time zone, yet compare unequal. This is a serious bug, as it
enables subtle bugs if a time.Time is used as a key in a map or database.
We need to find a way either to to break == statically or make it work dynamically.
Too late for 1.4, as the issue is subtle. Marking for 1.5.
The text was updated successfully, but these errors were encountered:
I don't this can be changed. With sufficient care one can construct time.Time values
that *are* sensibly comparable with ==, and use them as map keys or whatever. We'd be
breaking such code.
The text was updated successfully, but these errors were encountered: