From a972e8ccb9824d97f029bde5409527fb27e85989 Mon Sep 17 00:00:00 2001 From: subham sarkar Date: Thu, 15 Oct 2020 00:24:14 +0530 Subject: all: fix quoting for compress/bzip2 and time's godoc The existing usage of grave accent (`) and apostrophe (') at some places made godoc to ignore them and show it as it is. So, use both of the characters twice (consecutively) so that godoc can convert it to {left,right} double quotation mark. Fixes #41958 Change-Id: I64fd9b5fa34f416ad595009d09f5482e10bd8b4f Reviewed-on: https://go-review.googlesource.com/c/go/+/262397 Reviewed-by: Russ Cox Trust: Alberto Donizetti --- src/time/tick.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/time/tick.go') diff --git a/src/time/tick.go b/src/time/tick.go index 152d5a706b..2311faa15f 100644 --- a/src/time/tick.go +++ b/src/time/tick.go @@ -6,7 +6,7 @@ package time import "errors" -// A Ticker holds a channel that delivers `ticks' of a clock +// A Ticker holds a channel that delivers ``ticks'' of a clock // at intervals. type Ticker struct { C <-chan Time // The channel on which the ticks are delivered. -- cgit v1.3 From bcfaeca58c791ada53fae18fffa26936bc245423 Mon Sep 17 00:00:00 2001 From: Alberto Donizetti Date: Wed, 28 Oct 2020 10:48:17 +0100 Subject: time: in NewTicker, document that the 1st tick comes after d Fixes #42245 Change-Id: I3b298ab6be65569389873d68bd3c6e49cf892c69 Reviewed-on: https://go-review.googlesource.com/c/go/+/265818 Reviewed-by: Ian Lance Taylor Reviewed-by: Rob Pike Trust: Alberto Donizetti --- src/time/tick.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/time/tick.go') diff --git a/src/time/tick.go b/src/time/tick.go index 2311faa15f..81d2a43f28 100644 --- a/src/time/tick.go +++ b/src/time/tick.go @@ -13,11 +13,12 @@ type Ticker struct { r runtimeTimer } -// NewTicker returns a new Ticker containing a channel that will send the -// time with a period specified by the duration argument. -// It adjusts the intervals or drops ticks to make up for slow receivers. -// The duration d must be greater than zero; if not, NewTicker will panic. -// Stop the ticker to release associated resources. +// NewTicker returns a new Ticker containing a channel that will send +// the time on the channel after each tick. The period of the ticks is +// specified by the duration argument. The ticker will adjust the time +// interval or drop ticks to make up for slow receivers. +// The duration d must be greater than zero; if not, NewTicker will +// panic. Stop the ticker to release associated resources. func NewTicker(d Duration) *Ticker { if d <= 0 { panic(errors.New("non-positive interval for NewTicker")) -- cgit v1.3