-
Notifications
You must be signed in to change notification settings - Fork 223
golangci-lint: fix all the reported lint errors #2484
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
Conversation
Reviewer's GuideThis PR migrates synchronous exec.Command, net.Listen, and net.Dial calls to their context-aware variants using context.Background, addressing lint errors introduced by the updated golangci-lint rules. Class diagram for updated usage of exec and net packagesclassDiagram
class exec {
+Command(name string, arg ...string) *Cmd
+CommandContext(ctx context.Context, name string, arg ...string) *Cmd
}
class net {
+Dial(network, address string) (Conn, error)
+Dialer
+Dialer.DialContext(ctx context.Context, network, address string) (Conn, error)
}
class context {
+Background() Context
}
exec <.. context : uses
net <.. context : uses
net <|-- net.Dialer
net.Dialer <.. context : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe, sourcery-ai[bot] The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
commit 2d75d8e bumped the linter version without fixing the new issues. Follow-up for containers#2482 Signed-off-by: Giuseppe Scrivano <[email protected]>
e3b7c05 to
6a74d9f
Compare
commit 2d75d8e bumped the linter version without fixing the new issues.
Follow-up for #2482
Summary by Sourcery
Fix all reported lint errors by replacing context-less calls to exec.Command, net.Listen, and net.Dial with their context-aware counterparts across the codebase.
Enhancements: