refactor: nested format string

This commit is contained in:
koba1t
2025-08-18 06:16:24 +09:00
parent caa42b7125
commit 785fce97df
3 changed files with 5 additions and 6 deletions

View File

@@ -52,9 +52,9 @@ Installation and setup instructions: https://kubernetes.io/docs/tasks/tools/inst
command.Stderr = &stderr
err := command.Run()
if err != nil {
return fmt.Errorf("%w\n%s", err, stderr.String()+errMsg)
return fmt.Errorf("%w\n%s%s", err, stderr.String(), errMsg)
} else if stdout.String() == "" {
return fmt.Errorf("%s", stderr.String()+errMsg)
return fmt.Errorf("%s%s", stderr.String(), errMsg)
}
// format and output