From 42a7937c34f1d78f748a1444a3a723b35ba267fd Mon Sep 17 00:00:00 2001 From: Abhishek-kumar09 Date: Mon, 6 Sep 2021 13:58:11 +0530 Subject: [PATCH] remove lint errors Signed-off-by: Abhishek-kumar09 --- pkg/blockdevice/blockdevice.go | 2 +- pkg/util/error_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/blockdevice/blockdevice.go b/pkg/blockdevice/blockdevice.go index f7c99de4..0091308d 100644 --- a/pkg/blockdevice/blockdevice.go +++ b/pkg/blockdevice/blockdevice.go @@ -88,7 +88,7 @@ func createTreeByNode(k *client.K8sClient, bdNames []string) error { rows = append(rows, metav1.TableRow{Cells: []interface{}{"", "", "", "", "", "", ""}}) } if len(rows) == 0 { - util.HandleEmptyTableError("Block Device", k.Ns, "") + return util.HandleEmptyTableError("Block Device", k.Ns, "") } else { // Show the output using cli-runtime util.TablePrinter(util.BDTreeListColumnDefinations, rows, printers.PrintOptions{Wide: true}) diff --git a/pkg/util/error_test.go b/pkg/util/error_test.go index c7dfe516..7f44b965 100644 --- a/pkg/util/error_test.go +++ b/pkg/util/error_test.go @@ -103,7 +103,7 @@ func TestHandleEmptyTableError(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - HandleEmptyTableError(tt.args.resource, tt.args.ns, tt.args.casType) + _ = HandleEmptyTableError(tt.args.resource, tt.args.ns, tt.args.casType) }) } }