From da3de3c2eb91ce7d00709f454d88c8f41657e365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 9 Jul 2021 17:21:16 +0200 Subject: [PATCH] shim-v2: Fix `gosimple` issue on utils_test.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For some reason our static check started to get opinionated about code that's been there for ages. One of the suggestions is to improve: ``` INFO: Running golangci-lint on /home/fidencio/go/src/github.com/kata-containers/kata-containers/src/runtime/containerd-shim-v2 utils_test.go:76:36: S1039: unnecessary use of fmt.Sprintf (gosimple) testDir, err = ioutil.TempDir("", fmt.Sprintf("shimV2-")) ``` And that's what this PR is about. Fixes: #2204 Signed-off-by: Fabiano FidĂȘncio --- src/runtime/containerd-shim-v2/utils_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/containerd-shim-v2/utils_test.go b/src/runtime/containerd-shim-v2/utils_test.go index 492a0b41c..96faeaf71 100644 --- a/src/runtime/containerd-shim-v2/utils_test.go +++ b/src/runtime/containerd-shim-v2/utils_test.go @@ -73,7 +73,7 @@ func init() { var err error fmt.Printf("INFO: creating test directory\n") - testDir, err = ioutil.TempDir("", fmt.Sprintf("shimV2-")) + testDir, err = ioutil.TempDir("", "shimV2-") if err != nil { panic(fmt.Sprintf("ERROR: failed to create test directory: %v", err)) }