-
Notifications
You must be signed in to change notification settings - Fork 111
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
Return HTTP response as second return value from typed API client functions #624
base: main
Are you sure you want to change the base?
Conversation
…ions Signed-off-by: Stefano Arlandini <[email protected]>
Signed-off-by: Stefano Arlandini <[email protected]>
…nctions Signed-off-by: Stefano Arlandini <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #624 +/- ##
==========================================
- Coverage 57.29% 56.70% -0.59%
==========================================
Files 315 374 +59
Lines 9823 8036 -1787
==========================================
- Hits 5628 4557 -1071
+ Misses 2902 2171 -731
- Partials 1293 1308 +15
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Big breaking change :( If |
No, it doesn’t. Also, it's conventional in Go to return error as last value. But, even though it’s a breaking change, it’s quite easy to track it and solve it as the project will not compile until the new returned value is either ignored or handled, and find and replace in most cases might be all a user needs to do if he never bothers about the response. Considering that this change is targeting the next major version, where this kind of things is expected to happen, I don’t see big downsides. |
I think we still want this. I'd want other maintainers to chime into this like @Jakob3xD. |
From my side, I'm still open to finish the changes, but given the amount of time that must be spent on fixing all stuffs, I want to be sure first that this is gonna be merged at some point |
Understandable. All this boilerplate should be generated though, the big ticket that someone should tackle first is #284 and this change becomes trivial. |
Description
I'm refactoring the functions of the typed clients to return the HTTP response as second value.
Issues Resolved
Closes #619
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.