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
+3 -3
View File
@@ -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
}