Commit 9eb9c7ba authored by Agniva De Sarker's avatar Agniva De Sarker Committed by Agniva De Sarker

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/+/206123Reviewed-by: default avatarEmmanuel Odeke <emm.odeke@gmail.com>
parent e6fb39aa
...@@ -167,8 +167,8 @@ func statusUpdate() string { return "" } ...@@ -167,8 +167,8 @@ func statusUpdate() string { return "" }
func ExampleTick() { func ExampleTick() {
c := time.Tick(5 * time.Second) c := time.Tick(5 * time.Second)
for now := range c { for next := range c {
fmt.Printf("%v %s\n", now, statusUpdate()) fmt.Printf("%v %s\n", next, statusUpdate())
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment