From 1a32107e284d7eb021dfccfa92a5135f3382fea7 Mon Sep 17 00:00:00 2001 From: Paul Mars Date: Wed, 14 Aug 2024 15:15:40 +0200 Subject: [PATCH] lint: Fix golangci-lint error This is due to the new version incorporating new go1.23 vet behavior. Signed-off-by: Paul Mars --- internal/statemachine/helper.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/statemachine/helper.go b/internal/statemachine/helper.go index 88ffdb38..6efb8a97 100644 --- a/internal/statemachine/helper.go +++ b/internal/statemachine/helper.go @@ -3,6 +3,7 @@ package statemachine import ( "bytes" "encoding/binary" + "errors" "fmt" "io/fs" "math" @@ -723,7 +724,7 @@ func execTeardownCmds(teardownCmds []*exec.Cmd, debug bool, prevErr error) (err err = fmt.Errorf("teardown failed: %s", strings.Join(errs, "\n")) if prevErr != nil { errs := append([]string{prevErr.Error()}, errs...) - err = fmt.Errorf(strings.Join(errs, "\n")) + err = errors.New(strings.Join(errs, "\n")) } }