Commit 447c3371 authored by tummychow's avatar tummychow

Remove glog dependency from fielderrors

parent bd8ee1c4
...@@ -23,7 +23,6 @@ import ( ...@@ -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 { ...@@ -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 { ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment