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

Export returned values #91

Merged
merged 2 commits into from
Apr 30, 2020
Merged

Export returned values #91

merged 2 commits into from
Apr 30, 2020

Conversation

weppos
Copy link
Member

@weppos weppos commented Apr 28, 2020

In #54 I decided to change the method signatures to not export the response values. At a distance of few years, I believe this was probably not a good idea.

While it works in most cases, it makes more complex to implement testing. An example is when you need to create tests that will construct pagination.

https://github.com/kubernetes-sigs/external-dns/blob/master/provider/dnsimple_test.go#L105-L128

golint is also quite vocal about how it may be annoying to not export the values.

I'm rolling back the changes in this PR. The good news is that since we forced the callers to never reference the value directly, this change should have very limited impact on anyone using the client.

Anyways, I'm working on several breaking changes as part of the next release, so it's a good time to include this PR as well.

@weppos weppos added enhancement New feature, enhancement or code changes, not related to defects ready-for-review Pull requests that are ready to be reviewed by other team members. labels Apr 28, 2020
@weppos weppos self-assigned this Apr 28, 2020
@weppos weppos requested a review from aeden April 28, 2020 18:01
@weppos weppos mentioned this pull request Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, enhancement or code changes, not related to defects ready-for-review Pull requests that are ready to be reviewed by other team members.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants