Hello,
I've noticed that :parse is not called for the default value.
I have a definision like:
(defn parse-duration [duration] (Duration/parse duration))
"--duration DURATION" {:doc (str "Optional: amount of time the certificate should be valid for."
"Valid time units are seconds: 's', minutes: 'm', hours: 'h'")
:default "8760h0m0s"
:parse time/parse-duration}
Parse is not called as per documentation.
I get the string value.
If you have a :default which is a string, and you have a :parse function, then the default will be run through parse as well. It's generally best to set the default to a string or a number, this will look better in the help text, where we show the default.
To fix things, I have to use:
:default (parse-duration "8760h0m0s")
Hello,
I've noticed that
:parseis not called for the default value.I have a definision like:
Parse is not called as per documentation.
I get the string value.
To fix things, I have to use: