backoff icon indicating copy to clipboard operation
backoff copied to clipboard

Reverse the parameters of Retry

Open bobg opened this issue 4 years ago • 1 comments

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 {
  ...
})

bobg avatar Jun 04 '20 05:06 bobg

Good idea. This can be implemented in v5.

cenkalti avatar Jun 04 '20 12:06 cenkalti