From 3788f39d5eb9e8161af76dc4fbb8ada30f872a50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laforge?= Date: Wed, 26 Jun 2019 08:49:49 +0200 Subject: [PATCH] Fix time.Ticker name --- RateLimiting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RateLimiting.md b/RateLimiting.md index fd37d62e..f00836fe 100644 --- a/RateLimiting.md +++ b/RateLimiting.md @@ -9,7 +9,7 @@ For higher rates, prefer a token bucket rate limiter such as [golang.org/x/time/ import "time" rate := time.Second / 10 -throttle := time.Tick(rate) +throttle := time.Ticker(rate) for req := range requests { <-throttle // rate limit our Service.Method RPCs go client.Call("Service.Method", req, ...)