1
0
mirror of https://github.com/rancher/steve.git synced 2025-05-14 02:44:20 +00:00

golangci-lint wants 'errors.New' with a constant.

This commit is contained in:
Eric Promislow 2025-04-22 16:45:00 -07:00
parent 8be4679248
commit 73577e735b

View File

@ -4,6 +4,7 @@ package partition
import (
"context"
"errors"
"fmt"
"os"
"reflect"
@ -389,7 +390,7 @@ func toAPIEvent(apiOp *types.APIRequest, schema *types.APISchema, event watch.Ev
if event.Type == watch.Error {
status, _ := event.Object.(*metav1.Status)
apiEvent.Error = fmt.Errorf(status.Message)
apiEvent.Error = errors.New(status.Message)
return apiEvent
}