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

Reverse the parameters of Retry #101

Open
bobg opened this issue Jun 4, 2020 · 1 comment
Open

Reverse the parameters of Retry #101

bobg opened this issue Jun 4, 2020 · 1 comment

Comments

@bobg
Copy link
Contributor

bobg commented Jun 4, 2020

The Operation argument to Retry is likely to be a (possibly lengthy) inline function literal. This can make it hard to locate the BackOff argument that must follow it. It would be slightly more ergonomic to be able to write:

err = backoff.Retry(bkoff, func() error {
  ...
})
@cenkalti
Copy link
Owner

cenkalti commented Jun 4, 2020

Good idea. This can be implemented in v5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants