final checks on opt values moved after option parsing is complete
This commit is contained in:
+2
-2
@@ -67,9 +67,9 @@ func (opt *cliOptionBool) parse(parser cliParser, argIndex int, valuePtr *string
|
||||
return
|
||||
}
|
||||
|
||||
func (opt *cliOptionBool) finalCheck(cliValue string) (err error) {
|
||||
func (opt *cliOptionBool) finalCheck() (err error) {
|
||||
currentValue, _ := opt.getTargetVar()
|
||||
return opt.getBase().checkValue(cliValue, currentValue)
|
||||
return opt.getBase().checkValue(currentValue)
|
||||
}
|
||||
|
||||
func (cli *CliParser) AddBoolOpt(name, short string, targetVar *bool, description string, aliases ...string) OptReference {
|
||||
|
||||
Reference in New Issue
Block a user