mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +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"
|
"k8s.io/kubernetes/pkg/util/errors"
|
||||||
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
"github.com/davecgh/go-spew/spew"
|
||||||
"github.com/golang/glog"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// ValidationErrorType is a machine readable value providing more detail about why
|
// ValidationErrorType is a machine readable value providing more detail about why
|
||||||
@ -74,7 +73,7 @@ func (t ValidationErrorType) String() string {
|
|||||||
case ValidationErrorTypeTooLong:
|
case ValidationErrorTypeTooLong:
|
||||||
return "too long"
|
return "too long"
|
||||||
default:
|
default:
|
||||||
glog.Errorf("unrecognized validation type: %#v", t)
|
panic(fmt.Sprintf("unrecognized validation type: %#v", t))
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -161,7 +160,7 @@ func (list ValidationErrorList) Prefix(prefix string) ValidationErrorList {
|
|||||||
}
|
}
|
||||||
list[i] = err
|
list[i] = err
|
||||||
} else {
|
} 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
|
return list
|
||||||
|
Loading…
Reference in New Issue
Block a user