klevy-toast opened a new pull request, #1433:
URL: https://github.com/apache/pulsar-client-go/pull/1433
<!--
### Contribution Checklist
- Name the pull request in the form "[Issue XYZ][component] Title of the
pull request", where *XYZ* should be replaced by the actual issue number.
Skip *Issue XYZ* if there is no associated github issue for this pull
request.
Skip *component* if you are unsure about which is the best component.
E.g. `[docs] Fix typo in produce method`.
- Fill out the template below to describe the changes contributed by the
pull request. That will give reviewers the context they need to do the review.
- Each pull request should address only one issue, not mix up code from
multiple issues.
- Each commit in the pull request has a meaningful commit message
- Once all items of the checklist are addressed, remove the above text and
this checklist, leaving only the filled out template below.
**(The sections below can be removed for hotfixes of typos)**
-->
*(If this PR fixes a github issue, please add `Fixes #<xyz>`.)*
Fixes #1431
### Motivation
For the namespace / topic admin methods that return a pointer, explicitly
return nil if the method isn't set (API returns empty body)
### Modifications
- New method in client.go `GetBodyWithContext` that returns body & error
- Modify 14 methods across topic & namespace files to use new method, check
the body, and return nil if the body is nil
- Update tests and add new test coverage that was missing
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
This change added tests and can be verified as follows:
- Added missing test coverage for properties that were not previously
tested
- Modified existing test to verify property is nil on initial state /
after removal
### Does this pull request potentially affect one of the following parts:
*If `yes` was chosen, please highlight the changes*
- Dependencies (does it add or upgrade a dependency): (yes / **no**)
- The public API: (yes / **no**)
- The schema: (yes / **no** / don't know)
- The default values of configurations: (yes / **no**)
- The wire protocol: (yes / **no**)
### Documentation
- Does this pull request introduce a new feature? (yes / **no**)
- Updated the go docs to mention nil return values on all relevant methods
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]