mirror of
https://github.com/kyverno/kyverno.git
synced 2025-01-20 18:52:16 +00:00
format
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
This commit is contained in:
parent
e0e6074afc
commit
89d1e4afab
3 changed files with 4 additions and 5 deletions
|
@ -12,7 +12,6 @@ import (
|
|||
"github.com/kyverno/kyverno/pkg/engine/wildcards"
|
||||
)
|
||||
|
||||
|
||||
type PatternError struct {
|
||||
Err error
|
||||
Path string
|
||||
|
|
|
@ -459,7 +459,7 @@ func (v *validator) validatePatterns(resource unstructured.Unstructured) *respon
|
|||
if v.pattern != nil {
|
||||
if err := validate.MatchPattern(v.log, resource.Object, v.pattern); err != nil {
|
||||
|
||||
if pe, ok := err.(*validate.PatternError); ok{
|
||||
if pe, ok := err.(*validate.PatternError); ok {
|
||||
v.log.V(3).Info("validation error", "path", pe.Path, "error", err.Error())
|
||||
if pe.Path == "" {
|
||||
return ruleResponse(v.rule, v.buildErrorMessage(err, ""), response.RuleStatusError)
|
||||
|
|
Loading…
Add table
Reference in a new issue