Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/time/rate: documentation of Limiter.ReserveN does not return bool #38434

Closed
yvesf opened this issue Apr 14, 2020 · 5 comments
Closed

x/time/rate: documentation of Limiter.ReserveN does not return bool #38434

yvesf opened this issue Apr 14, 2020 · 5 comments
Labels
Documentation FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@yvesf
Copy link

yvesf commented Apr 14, 2020

Does this issue reproduce with the latest release?

yes, latest release of time/rate contains this documentation string

What did you expect to see?

...
// ReserveN returns false if n exceeds the Limiter's burst size.
// Usage example:
...
func (lim *Limiter) ReserveN(now time.Time, n int) *Reservation {

What did you see instead?

...
// On the returned Reservation OK() returns false if n exceeds the Limiter's burst size.
// Usage example:
...
func (lim *Limiter) ReserveN(now time.Time, n int) *Reservation {
@gopherbot gopherbot added this to the Unreleased milestone Apr 14, 2020
@andybons andybons changed the title x/time: documentation of Limiter.ReserveN does not return bool x/time/rate: documentation of Limiter.ReserveN does not return bool Apr 14, 2020
@andybons
Copy link
Member

I would word it slightly differently:

// The returned Reservation’s OK() method returns false if n exceeds the Limiter's burst size.

@andybons andybons added help wanted NeedsFix The path to resolution is known, but the work has not been done. labels Apr 14, 2020
@obeyda
Copy link
Contributor

obeyda commented Apr 15, 2020

@andybons , I can fix that, should i send a cl?

@andybons
Copy link
Member

andybons commented Apr 15, 2020

@obeyda sure. @yvesf may send one before you so I’d keep an eye out.

@obeyda
Copy link
Contributor

obeyda commented Apr 15, 2020

@gopherbot
Copy link

Change https://golang.org/cl/228357 mentions this issue: rate: fix documentation of Limiter.ReserveN()

@golang golang locked and limited conversation to collaborators Apr 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants