From: Rob Pike Date: Thu, 23 Jun 2016 22:28:36 +0000 (-0700) Subject: time: update documentation for Duration.String regarding the zero value X-Git-Tag: go1.7rc1~58 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2834526fd9de26079bebc726d3ce3ccaaf38a0aa;p=gostls13.git 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 --- 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