trim whitespace
This commit is contained in:
parent
be0cc4b871
commit
64d3555482
@ -278,6 +278,7 @@ func argIsFlag(commandFlags []Flag, arg string) bool {
|
|||||||
// look through all the flags, to see if the `arg` is one of our flags
|
// look through all the flags, to see if the `arg` is one of our flags
|
||||||
for _, flag := range commandFlags {
|
for _, flag := range commandFlags {
|
||||||
for _, key := range strings.Split(flag.GetName(), ",") {
|
for _, key := range strings.Split(flag.GetName(), ",") {
|
||||||
|
key := strings.TrimSpace(key)
|
||||||
if key == arg {
|
if key == arg {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user