From 6e90f5d7776e29be06ac4e728cbd782e41ff3d83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A5=96=E5=BB=BA?= Date: Wed, 27 Sep 2023 10:37:36 +0800 Subject: [PATCH] ignore gosec G304 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张祖建 --- cmd/cmdmain.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/cmdmain.go b/cmd/cmdmain.go index de85fc3148ff..12435b75dc68 100644 --- a/cmd/cmdmain.go +++ b/cmd/cmdmain.go @@ -42,7 +42,7 @@ func profile() { for { <-ch1 name := fmt.Sprintf("cpu-profile-%s.pprof", time.Now().Format(timeFormat)) - f, err := os.Create(filepath.Join(os.TempDir(), name)) // #nosec G303 + f, err := os.Create(filepath.Join(os.TempDir(), name)) // #nosec G303,G304 if err != nil { klog.Errorf("failed to create cpu profile file: %v", err) return @@ -60,7 +60,7 @@ func profile() { for { <-ch2 name := fmt.Sprintf("mem-profile-%s.pprof", time.Now().Format(timeFormat)) - f, err := os.Create(filepath.Join(os.TempDir(), name)) // #nosec G303 + f, err := os.Create(filepath.Join(os.TempDir(), name)) // #nosec G303,G304 if err != nil { klog.Errorf("failed to create memory profile file: %v", err) return