mirror of
https://github.com/golang/go
synced 2024-11-18 13:44:48 -07:00
time: remove some redundant equality comparison documentation
Updates to CL 45698 Updates #19510 Change-Id: Iec7a455b6c4d5f96d0b674459bf1455c99102d62 Reviewed-on: https://go-review.googlesource.com/45779 Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
cabf622da8
commit
862e45d49d
@ -60,15 +60,10 @@
|
|||||||
// t.UnmarshalJSON, and t.UnmarshalText always create times with
|
// t.UnmarshalJSON, and t.UnmarshalText always create times with
|
||||||
// no monotonic clock reading.
|
// no monotonic clock reading.
|
||||||
//
|
//
|
||||||
// Note that the Go == operator compares not just the time instant but also
|
// Note that the Go == operator compares not just the time instant but
|
||||||
// the Location and the monotonic clock reading. If time values returned
|
// also the Location and the monotonic clock reading. See the
|
||||||
// from time.Now and time values constructed by other means (for example,
|
// documentation for the Time type for a discussion of equality
|
||||||
// by time.Parse or time.Unix) are meant to compare equal when used as map
|
// testing for Time values.
|
||||||
// keys, the times returned by time.Now must have the monotonic clock
|
|
||||||
// reading stripped, by setting t = t.Round(0). In general, prefer
|
|
||||||
// t.Equal(u) to t == u, since t.Equal uses the most accurate comparison
|
|
||||||
// available and correctly handles the case when only one of its arguments
|
|
||||||
// has a monotonic clock reading.
|
|
||||||
//
|
//
|
||||||
// For debugging, the result of t.String does include the monotonic
|
// For debugging, the result of t.String does include the monotonic
|
||||||
// clock reading if present. If t != u because of different monotonic clock readings,
|
// clock reading if present. If t != u because of different monotonic clock readings,
|
||||||
|
Loading…
Reference in New Issue
Block a user