Fix QF1003: could use tagged switch" staticcheck warning

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2025-03-27 15:14:48 -07:00
parent 0dddc5e3c0
commit 0105131b5c
8 changed files with 40 additions and 34 deletions

View File

@ -238,8 +238,8 @@ func setContainerNameForTemplate(startCommand []string, info *containerInfo) ([]
break
}
}
switch {
case nameIx == -1:
switch nameIx {
case -1:
// if not found, add --name argument in the command slice before the "run" argument.
// it's assumed that the command slice contains this argument.
runIx := -1