quote the flag name

This commit is contained in:
Lynn Cyrin
2019-07-13 01:03:46 -07:00
parent 6a2ae78373
commit f6777bf4bf

View File

@@ -305,7 +305,7 @@ func checkRequiredFlags(flags []Flag, set *flag.FlagSet) error {
if rf.IsRequired() { if rf.IsRequired() {
key := strings.Split(f.GetName(), ",")[0] key := strings.Split(f.GetName(), ",")[0]
if !visited[key] { if !visited[key] {
return fmt.Errorf("Required flag %s not set", f.GetName()) return fmt.Errorf("Required flag %q not set", f.GetName())
} }
} }
} }