Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tg): accept any http client what satisfies doer interface #120

Merged
merged 2 commits into from
Apr 10, 2023

Conversation

Satont
Copy link
Contributor

@Satont Satont commented Mar 26, 2023

This will makes possible usage of go-retryablehttp, and any http client which relies on some internal things and have different from http.Client struct return, but satisfies http interface

This will makes possible usage of github.com/hashicorp/go-retryablehttp, any any http client which relies on some internal things  and have different from http.Client struct return, but satisfies http interface
@Satont
Copy link
Contributor Author

Satont commented Mar 26, 2023

Actually wrong, go-retryablehttp cannot be used because of Request mismatch. Let me check.

Edit: it has standardClient := retryClient.StandardClient(), so i it can be used just fine.
Edit2: ready for review/merge.

@Satont Satont closed this Mar 26, 2023
@Satont Satont reopened this Mar 26, 2023
@codecov
Copy link

codecov bot commented Apr 3, 2023

Codecov Report

Merging #120 (730e54d) into main (0acfbe9) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #120   +/-   ##
=======================================
  Coverage   93.30%   93.30%           
=======================================
  Files          20       20           
  Lines        2406     2406           
=======================================
  Hits         2245     2245           
  Misses        126      126           
  Partials       35       35           
Impacted Files Coverage Δ
client.go 63.18% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mr-linch
Copy link
Owner

mr-linch commented Apr 3, 2023

It seems right to make Doer public. I'm not sure that godoc will be able to show the private interface correctly

@mr-linch mr-linch merged commit 2d3a2e6 into mr-linch:main Apr 10, 2023
@mr-linch
Copy link
Owner

Thanks @Satont!

Your contribution has been merged and released in v0.8.1.

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.

2 participants