• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tecnickcom / gogen / 28751990389
100%

Build:
DEFAULT BRANCH: main
Ran 05 Jul 2026 07:24PM UTC
Jobs 1
Files 166
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Jul 2026 07:11PM UTC coverage: 99.969% (+0.02%) from 99.945%
28751990389

push

github

nicolaasuni
feat(httpretrier)!: rebuild on shared backoff, fix retry correctness, and honor Retry-After

Extract the duplicated exponential-backoff-with-jitter math into a new pkg/backoff (a pure per-call Schedule plus a standalone AddJitter; additive/full/equal jitter strategies; overflow-safe, non-negative bounds) and rebuild the retry and scheduling packages on it, replacing three diverging copies of the delay logic and the obsolete pre-Go-1.23 timer-drain dance.

- backoff: new package providing the shared delay Schedule and the AddJitter helper, both fully bounded and jitter-strategy aware.
- httpretrier: make Do a synchronous select loop (drop the per-call goroutine, background context, and channel handoff) so a panic in a user callback reaches the caller instead of crashing the process; uphold the response-XOR-error contract on every return path (cancellation, body-close error, and non-conforming clients); open the replay body lazily so an aborted retry never leaks it; add optional Retry-After support via WithRespectRetryAfter/WithMaxRetryAfter (jittered so clients do not re-synchronize); add WithJitterStrategy and a WithOnRetry observability hook; guard the exported retry policies against a nil response; and fail fast on an already-canceled request context.
- retrier: adopt pkg/backoff; add WithMaxDelay, WithJitterStrategy, and WithOnRetry; correct the "attempts" docs to mean total attempts (initial call plus retries).
- periodic: pace via backoff.AddJitter; make Start/Stop idempotent and race-free (a Stop ordered before Start prevents the loop from ever launching); drop the unnecessary reset channel.

All four packages retain 100% test coverage and pass go test -race with a clean golangci-lint run.

299 of 299 new or added lines in 6 files covered. (100.0%)

12871 of 12875 relevant lines covered (99.97%)

98155.82 hits per line

Jobs
ID Job ID Ran Files Coverage
1 28751990389.1 05 Jul 2026 07:24PM UTC 166
99.97
GitHub Action Run
Source Files on build 28751990389
  • Tree
  • List 166
  • Changed 5
  • Source Changed 5
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28751990389
  • d80f5e3a on github
  • Prev Build on main (#28746980286)
  • Next Build on main (#28753395155)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc