avamsi / climate

"CLI Mate" autogenerates CLIs from structs / functions (nested subcommands, global / local flags, help generation, typo suggestions, shell completion etc.)
https://pkg.go.dev/github.com/avamsi/climate#section-documentation
The Unlicense
147 stars 3 forks source link

Support arg validation #9

Closed avamsi closed 1 year ago

avamsi commented 1 year ago

At least NoArgs should be doable fairly easily.

We might be able to use singular args / arrays instead of slices for fixed length args.

Min / max args are more tricky -- maybe singular args / array (of min) and then a slice to cover for max (could be specified as a clifr directive)?

avamsi commented 1 year ago

We now set ExactArgs(0) automatically. Other are still pending.