final checks on opt values moved after option parsing is complete
This commit is contained in:
+3
-3
@@ -153,13 +153,13 @@ func (opt *cliOptionBase) fetchOptionValue(parser cliParser, argIndex int, value
|
||||
return
|
||||
}
|
||||
|
||||
func (opt *cliOptionBase) finalCheck(cliValue string) (err error) {
|
||||
func (opt *cliOptionBase) finalCheck() (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (opt *cliOptionBase) checkValue(cliValue string, value any) (err error) {
|
||||
func (opt *cliOptionBase) checkValue(value any) (err error) {
|
||||
if opt.finalCheckFunc != nil {
|
||||
err = opt.finalCheckFunc(cliValue, value)
|
||||
err = opt.finalCheckFunc(value)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user