aratare on Slack had this code:
["-v" nil "Verbosity level; may be specified up to 2 times. Levels: INFO (Default) -> DEBUG -> TRACE"
;; If no long-option is specified, an option :id must be given
:id :min-level
:default 0
:update-fn inc
:validate [(fn [a]
(println a)
(<= a 2)) "Verbosity level cannot exceed 2."]]
and asked:
and a
is printed as true
instead of either the level before or after applying update-fn
. Is there a way to work around this so I can validate after update-fn
has been called? Thanks in advance. (edited)