Open ste93cry opened 1 month ago
Attention: Patch coverage is 99.37107%
with 7 lines
in your changes missing coverage. Please review.
Project coverage is 56.70%. Comparing base (
06a6dc8
) to head (574ee61
). Report is 70 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
opensearchapi/api_cat.go | 95.00% | 6 Missing :warning: |
opensearchapi/api_cluster.go | 98.61% | 1 Missing :warning: |
Big breaking change :(
If data, response, err
was flipped as data, err, response
, would it be easier to migrate to? Does go allow to specify the first 2 objects and omit the third?
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.
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.