Skip to content

Commit 9c9b364

Browse files
committed
initialize the rate limiter internally
1 parent cd26f67 commit 9c9b364

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api/rest.go

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ var (
3939
Rest *RateLimiter
4040
)
4141

42+
func init() {
43+
Rest = NewRatelimiter()
44+
}
45+
4246
func (r *RateLimiter) Request(method, route string, data interface{}, reason *string) (*http.Response, error) {
4347
return r.requestWithBucketID(method, route, data, strings.SplitN(route, "?", 2)[0], reason)
4448
}

0 commit comments

Comments
 (0)