-
Notifications
You must be signed in to change notification settings - Fork 7
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
[Bug] Unusual use of *context.Context #19
Labels
bug
Something isn't working
Comments
7 tasks
austin-denoble
added a commit
that referenced
this issue
May 1, 2024
…ods (#20) ## Problem From this issue: #19 We're receiving and passing `*context.Context` in `IndexConnection` methods. This differs from our `Client` methods and is non-standard for how most libraries handle `Context`. ## Solution - Swap to receiving and passing `context.Context` by value rather than a pointer in `IndexConnection` methods, update README example to account. ## Type of Change - [X] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update - [ ] Infrastructure change (CI configs, etc) - [ ] Non-code change (docs, etc) - [ ] None of the above: (explain here) ## Test Plan CI Testing, make sure you can `just test` locally or `go build`
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this a new bug?
Current Behavior
Updating from v0.3 to v0.4, I like the new API, much easier to use. Nice work!
However, I did notice that the API methods all accept a
*context.Context
instead of acontext.Context
. That is highly unusual. Every other usage of context.Context inside the stdlib and other API clients iscontext.Context
, which makes me think it was unintentional. Taking address-of to satisfy the interface is no big deal, but it does seem like an API design error.Expected Behavior
Use context.Context, instead of a pointer to that interface.
Steps To Reproduce
N/A
Relevant log output
No response
Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: