]> Cypherpunks repositories - gostls13.git/commitdiff
time: change variable name to next
authorAgniva De Sarker <agnivade@yahoo.co.in>
Sun, 10 Nov 2019 08:44:47 +0000 (14:14 +0530)
committerAgniva De Sarker <agniva.quicksilver@gmail.com>
Sun, 10 Nov 2019 12:12:46 +0000 (12:12 +0000)
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>
src/time/example_test.go

index 2f890db2f427d695ef21b0bb9e028b9701a6a335..5a037daeafb358ec96f4b2f1cead84513fd44fa5 100644 (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())
        }
 }