linter(testifylint): use Len or Empty for arrays testing (#7555)

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2024-03-27 19:16:58 +01:00
committed by GitHub
parent 7a9d7a83ed
commit 3c704ba1b1
19 changed files with 67 additions and 49 deletions

View File

@@ -30,7 +30,7 @@ func mustHaveString(key string, flags map[string]string) (string, error) {
if value, exist := flags[key]; exist {
return value, nil
}
return "", errors.New("key " + key + " not found")
return "", errors.Errorf("key %s not found", key)
}
func optionalHaveString(key string, flags map[string]string) string {