Skip to content

Update README for DoWithData method transition#152

Open
JaSei wants to merge 2 commits intomainfrom
v5_braking_changes_doc
Open

Update README for DoWithData method transition#152
JaSei wants to merge 2 commits intomainfrom
v5_braking_changes_doc

Conversation

@JaSei
Copy link
Collaborator

@JaSei JaSei commented Feb 12, 2026

  • Change DoWithData to a method: retry.DoWithData(func, opts...)retry.NewWithData[T](opts...).Do(func)
  • Improve clarity in migration instructions and API simplification details.
  • Explain enhancements in performance and error handling with Go 1.20 support.

@JaSei JaSei requested a review from Copilot February 12, 2026 09:10
@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.70%. Comparing base (5bccbfa) to head (8668956).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #152   +/-   ##
=======================================
  Coverage   91.70%   91.70%           
=======================================
  Files           2        2           
  Lines         217      217           
=======================================
  Hits          199      199           
  Misses         12       12           
  Partials        6        6           
Flag Coverage Δ
unittest 91.70% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates library documentation to reflect the API migration from package-level DoWithData to the typed NewWithData[T]().Do(...) pattern, with clearer migration notes and Go 1.20 error-wrapping behavior.

Changes:

  • Update “HTTP GET with retry with data” examples to the new NewWithData[T]().Do(...) usage.
  • Add explicit migration notes for both Do and DoWithData transitions.
  • Clarify error-wrapping behavior (Unwrap() returning []error) for Go 1.20.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
retry.go Updates GoDoc examples and migration bullet list to the new NewWithData[T]().Do(...) API.
README.md Mirrors the same example and migration documentation updates for end users.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Change `DoWithData` to a method:
  `retry.DoWithData(func, opts...)` → `retry.NewWithData[T](opts...).Do(func)`
- Improve clarity in migration instructions and API simplification details.
- Explain enhancements in performance and error handling with Go 1.20 support.
@JaSei JaSei force-pushed the v5_braking_changes_doc branch from 6ddef53 to f631687 Compare February 12, 2026 09:17
- Extend GitHub Actions workflow to include Go 1.26
- Revise README and code comments for clarity on method transitions
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

Successfully merging this pull request may close these issues.

1 participant