Merge pull request #14867 from tummychow/no-fielderror-glog

Remove glog dependency from fielderrors
This commit is contained in:
Alex Robinson 2015-10-05 11:32:50 -07:00
commit 8f9feb40b9

View File

@ -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