Repository navigation
v0.6.0
Breaking changes
- Requires Go 1.26 or newer. (sethvargo/go-retry#56)
NewFibonaccireturns 1, 1, 2, 3, 5, as documented. It previously returned 1, 2, 3, 5, 8, so the second retry waited two bases instead of one. (sethvargo/go-retry#55)- When the context ends during retries,
DoandDoValuereturn the context error joined with the last error from the retried function. Comparisons likeerr == context.DeadlineExceededno longer match; useerrors.Isinstead. (sethvargo/go-retry#60) - All built-in middleware clamps a negative wait from the inner backoff to 0.
Doalready waited 0 for a negative value, so only direct calls toNextsee a difference. (sethvargo/go-retry#59, sethvargo/go-retry#62) WithJitterPercentuses a continuous random factor. The factor previously moved in whole-percent steps, soj=5produced only 10 distinct values between 0.96x and 1.05x. The range is now 0.95x to 1.05x. (sethvargo/go-retry#59)
What's Changed
- Return 1, 1, 2, 3 from Fibonacci backoff by @sethvargo in #55
- Require Go 1.26 and tighten tests and CI by @sethvargo in #56
- Fix stale godoc and README snippets by @sethvargo in #57
- Cut allocations in Do and Fibonacci by @sethvargo in #58
- Clamp negative waits and smooth jitter percent by @sethvargo in #59
- Return the last error when the context ends by @sethvargo in #60
- Clamp negative waits in MaxRetries and MaxDuration by @sethvargo in #62
Full Changelog: v0.5.0...v0.6.0