From d8286d4c364f5d48c1afdf4c76d987f02124099c Mon Sep 17 00:00:00 2001 From: Daniel Grunberger Date: Tue, 5 Sep 2023 11:37:43 +0300 Subject: [PATCH] go lint Signed-off-by: Daniel Grunberger --- cmd/utils/utils.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/utils/utils.go b/cmd/utils/utils.go index 152b6fe0..566edc61 100644 --- a/cmd/utils/utils.go +++ b/cmd/utils/utils.go @@ -1,7 +1,6 @@ package utils import ( - "errors" "fmt" "strings" @@ -10,7 +9,7 @@ import ( reporthandlingapis "github.com/kubescape/opa-utils/reporthandling/apis" ) -var ErrUnknownSeverity = errors.New(fmt.Sprintf("unknown severity. Supported severities are: %s", strings.Join(reporthandlingapis.GetSupportedSeverities(), ", "))) +var ErrUnknownSeverity = fmt.Errorf("unknown severity. Supported severities are: %s", strings.Join(reporthandlingapis.GetSupportedSeverities(), ", ")) // validateSeverity returns an error if a given severity is not known, nil otherwise func ValidateSeverity(severity string) error {