]> Cypherpunks repositories - gostls13.git/commitdiff
time: simplify: tell people to not use == with Time values
authorIan Lance Taylor <iant@golang.org>
Sun, 30 Oct 2016 15:56:19 +0000 (11:56 -0400)
committerIan Lance Taylor <iant@golang.org>
Tue, 1 Nov 2016 19:57:35 +0000 (19:57 +0000)
Change-Id: I49952f89b04f41109bb6591c6f025971d9880123
Reviewed-on: https://go-review.googlesource.com/32411
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: David Symonds <dsymonds@golang.org>
src/time/time.go

index 33da9fe3412d8e7c87e9d38a171dab5ab967b11c..03fde335c719283599fd83a07bb8af43c2aed172 100644 (file)
@@ -75,7 +75,7 @@ func (t Time) Before(u Time) bool {
 // 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 CEST and 4:00 UTC are Equal.
-// Note that using == with Time values produces unpredictable results.
+// Do not use == with Time values.
 func (t Time) Equal(u Time) bool {
        return t.sec == u.sec && t.nsec == u.nsec
 }