]> Cypherpunks repositories - gostls13.git/commitdiff
time: remove some redundant equality comparison documentation
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 14 Jun 2017 21:39:28 +0000 (21:39 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 14 Jun 2017 22:00:50 +0000 (22:00 +0000)
Updates to CL 45698

Updates #19510

Change-Id: Iec7a455b6c4d5f96d0b674459bf1455c99102d62
Reviewed-on: https://go-review.googlesource.com/45779
Reviewed-by: Rob Pike <r@golang.org>
src/time/time.go

index bd65546bb2ab7a7dbec1de747275c01cb6460820..3f13e3431ccad5f88cf37745810daaa8047e7862 100644 (file)
 // t.UnmarshalJSON, and t.UnmarshalText always create times with
 // no monotonic clock reading.
 //
-// Note that the Go == operator compares not just the time instant but also
-// the Location and the monotonic clock reading. If time values returned
-// from time.Now and time values constructed by other means (for example,
-// by time.Parse or time.Unix) are meant to compare equal when used as map
-// 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.
+// Note that the Go == operator compares not just the time instant but
+// also the Location and the monotonic clock reading. See the
+// documentation for the Time type for a discussion of equality
+// testing for Time values.
 //
 // For debugging, the result of t.String does include the monotonic
 // clock reading if present. If t != u because of different monotonic clock readings,