From 2834526fd9de26079bebc726d3ce3ccaaf38a0aa Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Thu, 23 Jun 2016 15:28:36 -0700 Subject: [PATCH] time: update documentation for Duration.String regarding the zero value It was out of date; in 1.7 the format changes to 0s. Change-Id: I2013a1b0951afc5607828f313641b51c74433257 Reviewed-on: https://go-review.googlesource.com/24421 Reviewed-by: Joe Tsai Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot --- src/time/time.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/time/time.go b/src/time/time.go index d9dbd3449a..c31de357d5 100644 --- a/src/time/time.go +++ b/src/time/time.go @@ -454,8 +454,7 @@ const ( // String returns a string representing the duration in the form "72h3m0.5s". // Leading zero units are omitted. As a special case, durations less than one // second format use a smaller unit (milli-, micro-, or nanoseconds) to ensure -// that the leading digit is non-zero. The zero duration formats as 0, -// with no unit. +// that the leading digit is non-zero. The zero duration formats as 0s. func (d Duration) String() string { // Largest time is 2540400h10m10.000000000s var buf [32]byte -- 2.50.0