From a86badc64d4a92ff2c5b74907a06f485956f6089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Mon, 20 Nov 2023 22:29:28 +0800 Subject: [PATCH] fix: lint --- pkg/tools/system_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/tools/system_test.go b/pkg/tools/system_test.go index 4902bb11..7295df27 100644 --- a/pkg/tools/system_test.go +++ b/pkg/tools/system_test.go @@ -122,10 +122,11 @@ func (s *SystemHelperTestSuite) TestChown() { func (s *SystemHelperTestSuite) TestExists() { filePath, _ := TempFile("testfile") - defer Remove(filePath.Name()) s.True(Exists(filePath.Name())) s.False(Exists("123")) + s.Nil(filePath.Close()) + s.Nil(Remove(filePath.Name())) } func (s *SystemHelperTestSuite) TestEmpty() {