mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Merge pull request #14867 from tummychow/no-fielderror-glog
Remove glog dependency from fielderrors
This commit is contained in:
commit
8f9feb40b9
@ -23,7 +23,6 @@ import (
|
||||
"k8s.io/kubernetes/pkg/util/errors"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
// ValidationErrorType is a machine readable value providing more detail about why
|
||||
@ -74,7 +73,7 @@ func (t ValidationErrorType) String() string {
|
||||
case ValidationErrorTypeTooLong:
|
||||
return "too long"
|
||||
default:
|
||||
glog.Errorf("unrecognized validation type: %#v", t)
|
||||
panic(fmt.Sprintf("unrecognized validation type: %#v", t))
|
||||
return ""
|
||||
}
|
||||
}
|
||||
@ -161,7 +160,7 @@ func (list ValidationErrorList) Prefix(prefix string) ValidationErrorList {
|
||||
}
|
||||
list[i] = err
|
||||
} else {
|
||||
glog.Warningf("Programmer error: ValidationErrorList holds non-ValidationError: %#v", list[i])
|
||||
panic(fmt.Sprintf("Programmer error: ValidationErrorList holds non-ValidationError: %#v", list[i]))
|
||||
}
|
||||
}
|
||||
return list
|
||||
|
Loading…
Reference in New Issue
Block a user