pflag icon indicating copy to clipboard operation
pflag copied to clipboard

Drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.

Results 112 pflag issues
Sort by recently updated
recently updated
newest added

How I can grouping options, for example with `Startup` and `Logging and input file` sections, like: ``` GNU Wget 1.21, a non-interactive network retriever. Usage: wget [OPTION]... [URL]... Mandatory arguments...

Currently, pflag requires the format of `key1=val1,key2=val2` for map/valued flags. We prefer to use the `:` delimiter (as in `key1:val1;key2:val2` instead of `=`. Would a PR to allow for delimiter...

> When using a help flag as -help, cobra understands as something like myprogram -h elp, this is the expected behavior? Shouldn't this be interpreted as unknown flag? > I'm...

Close #337 `FlagSet.ParseErrorsWhitelist.UnknownFlags=true` behaves like this: * Input: ``` -xayb -c -z --known-flag known-flag-value --unknown-flag arg0 arg1 arg2 ``` * -x, -y, -z and `--unknown-flag` are unknown * Args(): ```...

fixes [https://github.com/spf13/pflag/issues/236](https://github.com/spf13/pflag/issues/236), fixes[https://github.com/spf13/pflag/issues/293](https://github.com/spf13/pflag/issues/293), fixes [https://github.com/spf13/pflag/issues/299](https://github.com/spf13/pflag/issues/299) Hi, After merging this pull request we can add custom validation for any type of flag. It is optional and for this operation, you should...

As requested in https://github.com/spf13/pflag/issues/200#issuecomment-694477506, there should be a way to disable this function since it's unintuitive and can catch users off-guard. If a new major version is planned, I think...

https://play.golang.org/p/8mP9OQAxndt The user is not allowed to specify an empty map to --string-to-string option. We should treat an empty string (or some other special value) as a valid value. That...

If flagset.output was set to stderr, the error would still be printed to stdout instead of stderr.

possible fix for https://github.com/spf13/pflag/issues/370