From 2c5bce1cfa242f27ffece3d30e8b851e3e923be2 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sun, 30 Oct 2016 11:56:19 -0400 Subject: [PATCH] time: simplify: tell people to not use == with Time values Change-Id: I49952f89b04f41109bb6591c6f025971d9880123 Reviewed-on: https://go-review.googlesource.com/32411 Reviewed-by: Brad Fitzpatrick Reviewed-by: David Symonds --- src/time/time.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/time/time.go b/src/time/time.go index 33da9fe3412..03fde335c71 100644 --- a/src/time/time.go +++ b/src/time/time.go @@ -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 }