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 {
|
||||
*opt.targetVar = val
|
||||
} else {
|
||||
err = errInvalidOptionValue(opt.name, boxedValue, "array of int")
|
||||
err = errInvalidOptionValue(opt.name, boxedValue, "num-array")
|
||||
}
|
||||
} else {
|
||||
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)
|
||||
}
|
||||
} else {
|
||||
err = errInvalidOptionValue(opt.name, value, "num-array")
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user