Signed-off-by: Daniel Grunberger <danielgrunberger@armosec.io>
This commit is contained in:
Daniel Grunberger
2023-09-05 11:37:43 +03:00
parent 07d88e098b
commit d8286d4c36

View File

@@ -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 {