mow.cli icon indicating copy to clipboard operation
mow.cli copied to clipboard

BoolsOpt() for repeated flags (Boolean options)?

Open curio77 opened this issue 3 years ago • 1 comments

Am I mistaken or is there no way to have repeated Boolean options (flags), such as -vvv (say, for increasing a verbosity level)? With pflag, this is possible.

Intuitively, there should be a cmd.BoolsOpt() method enabling this (either operating on an int value or a []bool slice).

Opinions?

curio77 avatar Jan 05 '22 13:01 curio77

Came here looking for exactly this - a way to make -vvv work. Can't find anything like that, will skip for now. Would be nice to have an out-of-the-box solution.

alexykot avatar Jul 06 '24 15:07 alexykot