opt-int-array.go: changed data type in error messages
This commit is contained in:
parent
548b816d4b
commit
9e2e5c1f37
@ -73,7 +73,7 @@ func (opt *cliOptionIntArray) parse(parser cliParser, argIndex int, valuePtr *st
|
|||||||
if val, ok := boxedValue.([]int); ok {
|
if val, ok := boxedValue.([]int); ok {
|
||||||
*opt.targetVar = val
|
*opt.targetVar = val
|
||||||
} else {
|
} else {
|
||||||
err = errInvalidOptionValue(opt.name, boxedValue, "array of int")
|
err = errInvalidOptionValue(opt.name, boxedValue, "num-array")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for value := range strings.SplitSeq(optValue, ",") {
|
for value := range strings.SplitSeq(optValue, ",") {
|
||||||
@ -83,6 +83,7 @@ func (opt *cliOptionIntArray) parse(parser cliParser, argIndex int, valuePtr *st
|
|||||||
*opt.targetVar = append(*opt.targetVar, i)
|
*opt.targetVar = append(*opt.targetVar, i)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
err = errInvalidOptionValue(opt.name, value, "num-array")
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user