aboutsummaryrefslogtreecommitdiff
path: root/src/time/example_test.go
diff options
context:
space:
mode:
authorAgniva De Sarker <agnivade@yahoo.co.in>2019-11-10 14:14:47 +0530
committerAgniva De Sarker <agniva.quicksilver@gmail.com>2019-11-10 12:12:46 +0000
commit9eb9c7ba1c047c2463a524ea109c08b2dfbbb574 (patch)
treed09e5baeadd8ef7d0698f031325cfdc42d43b6d6 /src/time/example_test.go
parente6fb39aa6869fa5033b87c14a9826598679cb47d (diff)
downloadgo-9eb9c7ba1c047c2463a524ea109c08b2dfbbb574.tar.gz
go-9eb9c7ba1c047c2463a524ea109c08b2dfbbb574.zip
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>
Diffstat (limited to 'src/time/example_test.go')
-rw-r--r--src/time/example_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/time/example_test.go b/src/time/example_test.go
index 2f890db2f4..5a037daeaf 100644
--- a/src/time/example_test.go
+++ b/src/time/example_test.go
@@ -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())
}
}