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

*: remove *Context #1307

Merged
merged 3 commits into from
Nov 28, 2020
Merged

*: remove *Context #1307

merged 3 commits into from
Nov 28, 2020

Conversation

jehiah
Copy link
Member

@jehiah jehiah commented Nov 26, 2020

nsqd use of *Context and *context predates the stdlib context.Context and is now confusing; It was used to qualify references to the application struct often used for accessing configuration. This refactors to just remove the wrapper structs which doesn't significantly reduce clarity of code (and improves it in light of stdlib context)

This refactor is needed to import stdlib context anywhere in nsqd/... without naming conflicts.

Copy link
Member

@mreiferson mreiferson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this seems reasonable due to the naming conflict. I suppose this means that we'll have to hang anything we want to plumb through on struct nsqd, etc. Given we've never done that in nearly a decade, LGTM.

FYI there's a typo in the commit msg for nsqlookupd (two k's)

@mreiferson mreiferson changed the title code refactor: remove *Context *: remove *Context Nov 28, 2020
@jehiah jehiah merged commit 8adb229 into nsqio:master Nov 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants