Fix noctx lint errors by JamieMagee · Pull Request #571 · dependabot/cli (original) (raw)
Six places in the codebase call net.Listen, exec.Command, http.Post, or http.NewRequest without a context, which trips the noctx linter.
This replaces each one with its context-aware equivalent:
exec.Command→exec.CommandContextnet.Listen→(*net.ListenConfig).Listenhttp.Post→http.NewRequestWithContext+http.DefaultClient.Dohttp.NewRequest→http.NewRequestWithContext