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:
Fabiano Fidêncio 2021-07-09 17:21:16 +02:00
parent 305fb0547d
commit da3de3c2eb

View File

@ -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))
}