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

pkg/vminfo: remove Context from the constructor #5702

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

a-nogikh
Copy link
Collaborator

The context is assumed to be passed into the function doing the actual processing. Refactor vminfo to follow this approach.

This will help refactor pkg/rpcserver later.

The context is assumed to be passed into the function doing the actual
processing. Refactor vminfo to follow this approach.

This will help refactor pkg/rpcserver later.
@a-nogikh a-nogikh requested a review from dvyukov January 24, 2025 16:10
Copy link
Collaborator

@tarasmadan tarasmadan left a comment

Choose a reason for hiding this comment

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

+1.
Just FYI: documentation: "Do not store Contexts inside a struct type; instead, pass a Context explicitly to each function that needs it. The Context should be the first parameter, typically named ctx"

@a-nogikh
Copy link
Collaborator Author

I tried to also remove the ctx Context field of the checkContext struct, but it was just too many little changes.

@a-nogikh a-nogikh added this pull request to the merge queue Jan 24, 2025
Merged via the queue into google:master with commit 9fbd772 Jan 24, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants