mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 20:24:31 +00:00
shim-v2: Fix gosimple
issue on utils_test.go
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 <fidencio@redhat.com>
This commit is contained in:
parent
305fb0547d
commit
da3de3c2eb
@ -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))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user