fix staticcheck in pkg/printers

This commit is contained in:
tanjunchen 2019-12-05 10:24:42 +08:00
parent d9ed6110e8
commit 40911e74c1
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() ||