time: change variable name to next

The variable now implies that the next tick always
returns the current time which is not always the case.
Change it to next to clarify that it returns
the time of the next tick which is more appropriate.

Fixes #30271

Change-Id: Ie7719cb8c7180bc6345b436f9b3e950ee349d6e4
Reviewed-on: https://go-review.googlesource.com/c/go/+/206123
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
This commit is contained in:
Agniva De Sarker 2019-11-10 14:14:47 +05:30 committed by Agniva De Sarker
parent e6fb39aa68
commit 9eb9c7ba1c
1 changed files with 2 additions and 2 deletions

View File

@ -167,8 +167,8 @@ func statusUpdate() string { return "" }
func ExampleTick() {
c := time.Tick(5 * time.Second)
for now := range c {
fmt.Printf("%v %s\n", now, statusUpdate())
for next := range c {
fmt.Printf("%v %s\n", next, statusUpdate())
}
}