feat(cmd): improves error messaging for globs

This commit is contained in:
Lewis Wynne 2025-12-18 01:53:09 +00:00
parent 20294a9279
commit 3d4cd40a17
8 changed files with 20 additions and 14 deletions

View file

@ -1,6 +1,7 @@
package cmd
import (
"fmt"
"strings"
"github.com/gobwas/glob"
@ -52,3 +53,11 @@ func globMatch(matchers []glob.Glob, key string) bool {
}
return false
}
func formatGlobPatterns(patterns []string) string {
quoted := make([]string, 0, len(patterns))
for _, pattern := range patterns {
quoted = append(quoted, fmt.Sprintf("'%s'", pattern))
}
return strings.Join(quoted, ", ")
}