-
Notifications
You must be signed in to change notification settings - Fork 3
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
contextcheck doesn’t recognize Context implementations besides STL #20
Comments
This case was considered before, but later we decided on the standard for using custom context: Instead of directly using this custom struct, we should pass it through context.Context and retrieve the custom structure using ctx.Value, or use both ctx and the custom struct as two parameters. Using the custom struct to pass context is not very intuitive in the code. |
If I’m understanding you correctly, you’re saying that only the standard library should really implement the For better or for worse, my own project has a custom implementation, and we can’t easily change that. Would you accept a PR to add this flexibility, or do you prefer only to support the standard library’s Context? |
I must have missed one scenario. 😭
|
I have an interface that embeds the standard context.Context, and the linter pretty much doesn't recognize it as such.
is super cumbersome and muddles the code imo |
The following fails when I plug it into contextcheck’s test suite:
The text was updated successfully, but these errors were encountered: