From 4143bc7a9646e347394e96f52ca8e367ac5aefd9 Mon Sep 17 00:00:00 2001 From: Sakura Date: Wed, 15 Jan 2020 22:54:48 +0800 Subject: [PATCH] fix staticcheck errors in pkg/volume/hostpath. Signed-off-by: Sakura --- hack/.staticcheck_failures | 1 - pkg/volume/hostpath/host_path_test.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hack/.staticcheck_failures b/hack/.staticcheck_failures index 02999c23998..767d96b6a1c 100644 --- a/hack/.staticcheck_failures +++ b/hack/.staticcheck_failures @@ -48,7 +48,6 @@ pkg/volume/emptydir pkg/volume/fc pkg/volume/flexvolume pkg/volume/flocker -pkg/volume/hostpath pkg/volume/iscsi pkg/volume/local pkg/volume/portworx diff --git a/pkg/volume/hostpath/host_path_test.go b/pkg/volume/hostpath/host_path_test.go index fa94755b1bc..86b5a69a19c 100644 --- a/pkg/volume/hostpath/host_path_test.go +++ b/pkg/volume/hostpath/host_path_test.go @@ -327,10 +327,10 @@ func setUp() error { } f, err := os.OpenFile("/tmp/ExistingFolder/foo", os.O_CREATE, os.FileMode(0644)) - defer f.Close() if err != nil { return err } + defer f.Close() return nil }