uber-go / ratelimit

A Go blocking leaky-bucket rate limit implementation
MIT License
4.32k stars 300 forks source link

Correct the comments of Take functions #83

Closed cncal closed 2 years ago

cncal commented 2 years ago

As it can be configured by Per function, the per no longer always defaults to time.Second.

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

cncal commented 2 years ago

https://github.com/uber-go/ratelimit/blob/bf0eb9e5d6347f3021e739b7a77b0ab40916fefa/limiter_mutexbased.go#L37

It should be a new mutex based limiter ? If so, I can correct it in this PR.

rabbbit commented 2 years ago

Look good, thanks for the correction, sorry for the delay.

https://github.com/uber-go/ratelimit/blob/bf0eb9e5d6347f3021e739b7a77b0ab40916fefa/limiter_mutexbased.go#L37

It should be a new mutex based limiter ? If so, I can correct it in this PR.

No, this would be against Go docstring guideliness - for function X the comments should be in the format X does or X is, etc.