update golangci-lint to v2.1.1

Fixes three new issues found by nilnesserr.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2025-04-14 19:33:42 +02:00
parent f64204f651
commit f26765ceb0
4 changed files with 4 additions and 4 deletions

View File

@ -61,7 +61,7 @@ BUILDTAGS += ${EXTRA_BUILDTAGS}
# N/B: This value is managed by Renovate, manual changes are
# possible, as long as they don't disturb the formatting
# (i.e. DO NOT ADD A 'v' prefix!)
GOLANGCI_LINT_VERSION := 2.0.2
GOLANGCI_LINT_VERSION := 2.1.1
PYTHON ?= $(shell command -v python3 python|head -n1)
PKG_MANAGER ?= $(shell command -v dnf yum|head -n1)
# ~/.local/bin is not in PATH on all systems

View File

@ -85,7 +85,7 @@ func GetEvents(w http.ResponseWriter, r *http.Request) {
return
}
if evt.Error != nil {
logrus.Errorf("Unable to read event: %q", err)
logrus.Errorf("Unable to read event: %q", evt.Error)
continue
}
if evt.Event == nil {

View File

@ -167,7 +167,7 @@ func PodStop(w http.ResponseWriter, r *http.Request) {
responses, stopError = pod.Stop(r.Context(), false)
}
if stopError != nil && !errors.Is(stopError, define.ErrPodPartialFail) {
utils.Error(w, http.StatusInternalServerError, err)
utils.Error(w, http.StatusInternalServerError, stopError)
return
}
// Try to clean up the pod - but only warn on failure, it's nonfatal.

View File

@ -431,7 +431,7 @@ func Modify(ctx context.Context, name string, images []string, options *ModifyOp
artifactWriterGroup.Wait()
if artifactWriterError != nil {
return "", fmt.Errorf("uploading artifacts: %w", err)
return "", fmt.Errorf("uploading artifacts: %w", artifactWriterError)
}
data, err := io.ReadAll(response.Body)