-
Notifications
You must be signed in to change notification settings - Fork 129
Closed
Description
Sometimes I check that a counted flag isn't too high and I either clamp it or I produce an error. It's not too hard to do myself, of course, but I figured I'd propose it for inclusion in counted directly.
Maybe
counted(limit: Int = Int.MAX_VALUE, error: Boolean = false)This would allow
val verbosity by option("-v").counted(limit = 3)or
val rotations by options("-r").counted(limit = 2, error = true)but also allows this somewhat useless form
val inputCount by options("-i").counted(error = true) // never errorsLike I said, I don't need this, but I've written counted validation at least three times now so I figured it was worth proposing for inclusion.
Metadata
Metadata
Assignees
Labels
No labels