Patch release — no public API changes.
Bug fixes
- Backoff delay overflow with very large
Delay— the shift cap was computed viamath.Log2on a float64, which underflowed for delays nearmath.MaxInt64, producing invalid backoff delays. The cap is now derived exactly from the bit length ofmath.MaxInt64. (#161) AttemptsForErroris now honored whenAttemptsis 0 (UntilSucceeded) — the per-error budget was previously ignored in the retry-until-success loop; this also fixes auintunderflow when a budget of0was configured, which caused infinite retries. (#163, fixes #137)- Unbounded error accumulation with
LastErrorOnly(true)— errors were appended to the internal error log on every attempt even though only the last one is returned, growing memory without bound on long retry runs (e.g.Attempts(math.MaxUint)+ context cancellation). Only the last error is retained now; the returned error is unchanged. (#155, fixes #118)
Documentation & tooling
- Clarified the v5 migration for
DoWithData→NewWithData[T](#152) - README is now generated by an in-repo stdlib tool (
tools/genreadme) with a CI golden-file check, replacing the unmaintained godocdown — the v5 changelog and doc links now render correctly on both GitHub and pkg.go.dev (#169, resolves #77) - CI: Go 1.26/1.27 added to the matrix, pre-1.24 Go excluded from macOS runners, Codecov no longer fails Dependabot PRs (#165, #166)
- Development dependency: testify 1.11.1 → 1.12.1 (#168)
Thanks to @bensynapse, @AdamMagued, @Yanhu007, @c-tonneslan, @AruneshDwivedi and @team-humaki — whose contributions, including the ones superseded during review, shaped this release. 🙏