final checks on opt values moved after option parsing is complete

This commit is contained in:
2026-03-06 10:36:07 +01:00
parent 92267aec50
commit 9e28ee6545
11 changed files with 142 additions and 115 deletions
+2 -2
View File
@@ -53,9 +53,9 @@ func (opt *cliOptionMulti) parse(parser cliParser, argIndex int, valuePtr *strin
value = "true"
return
}
func (opt *cliOptionMulti) finalCheck(cliValue string) (err error) {
func (opt *cliOptionMulti) finalCheck() (err error) {
currentValue, _ := opt.getTargetVar()
return opt.getBase().checkValue(cliValue, currentValue)
return opt.getBase().checkValue(currentValue)
}
func (cli *CliParser) AddMultiOpt(name, short string, targetVar *int, defaultValue int, description string, aliases ...string) OptReference {