From 40911e74c16893a8b16ef7f7d08ce0d12e40f2f5 Mon Sep 17 00:00:00 2001 From: tanjunchen <2799194073@qq.com> Date: Thu, 5 Dec 2019 10:24:42 +0800 Subject: [PATCH] fix staticcheck in pkg/printers --- hack/.staticcheck_failures | 1 - pkg/printers/tablegenerator.go | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/hack/.staticcheck_failures b/hack/.staticcheck_failures index b850e0913ac..6e1da63d7ec 100644 --- a/hack/.staticcheck_failures +++ b/hack/.staticcheck_failures @@ -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 diff --git a/pkg/printers/tablegenerator.go b/pkg/printers/tablegenerator.go index 26bf9052d1c..b947a3af53a 100644 --- a/pkg/printers/tablegenerator.go +++ b/pkg/printers/tablegenerator.go @@ -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() ||