1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00
kyverno/pkg/kyverno/sanitizedError/error.go
2020-03-06 03:00:18 +05:30

20 lines
313 B
Go

package sanitizedError
type customError struct {
message string
}
func (c customError) Error() string {
return c.message
}
func New(message string) error {
return customError{message: message}
}
func IsErrorSanitized(err error) bool {
if _, ok := err.(customError); !ok {
return false
}
return true
}