Merge pull request #85790 from tanjunchen/fix-staticcheck-pkg-printers

fix staticcheck in pkg/printers
This commit is contained in:
Kubernetes Prow Robot 2019-12-05 13:50:54 -08:00 committed by GitHub
commit c2b312bd22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -18,7 +18,6 @@ pkg/kubelet/cm/devicemanager
pkg/kubelet/pluginmanager/operationexecutor
pkg/kubelet/pluginmanager/pluginwatcher
pkg/kubelet/remote
pkg/printers
pkg/probe/http
pkg/proxy/healthcheck
pkg/proxy/iptables

View File

@ -45,7 +45,6 @@ type PrintHandler interface {
type handlerEntry struct {
columnDefinitions []metav1.TableColumnDefinition
printFunc reflect.Value
args []reflect.Value
}
// HumanReadableGenerator is an implementation of TableGenerator used to generate
@ -160,7 +159,7 @@ func ValidateRowPrintHandlerFunc(printFunc reflect.Value) error {
funcType := printFunc.Type()
if funcType.NumIn() != 2 || funcType.NumOut() != 2 {
return fmt.Errorf("invalid print handler." +
"Must accept 2 parameters and return 2 value.")
"Must accept 2 parameters and return 2 value")
}
if funcType.In(1) != reflect.TypeOf((*GenerateOptions)(nil)).Elem() ||
funcType.Out(0) != reflect.TypeOf((*[]metav1.TableRow)(nil)).Elem() ||