Skip to content

Fix noctx linter #4163

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix noctx linter #4163

wants to merge 1 commit into from

Conversation

joshua-kim
Copy link
Contributor

Why this should be merged

It's not a part of our CI, but I have a local version of golangci which is newer and this fires for me locally. This linter enforces the usage of newer context function signatures.

How this works

Fixes linter by adding contexts where appropriate.

How this was tested

CI

Need to be documented in RELEASES.md?

No

@joshua-kim joshua-kim force-pushed the noctx branch 3 times, most recently from b864fce to 2e04ac1 Compare August 8, 2025 18:01
@joshua-kim joshua-kim moved this to In Progress 🏗️ in avalanchego Aug 8, 2025
Comment on lines +20 to +21
func Lookup(ctx context.Context, hostname string) (netip.Addr, error) {
ips, err := (&net.Resolver{}).LookupIPAddr(ctx, hostname)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a good change 👍

Co-authored-by: Stephen Buttolph <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress 🏗️
Development

Successfully merging this pull request may close these issues.

2 participants