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

Its in the stdlib flag interface; and when you're doing flagset specific `Usage()` functions, you kinda need it if you want to use the same output as the `flag.Usage()`...

This is useful for programs which want to define some flags with pflag (for example, in external packages) but still need to use Go flag command line parsing to preserve...

From https://github.com/spf13/cobra/issues/1396: Just spent another minute looking at this and that I think it is caused from the pflag library here https://github.com/spf13/pflag/blob/85dd5c8bc61cfa382fecd072378089d4e856579d/flag.go#L733 The %q is what causes it to be...

## Description Hello everyone, I've been using the `pflag` library and it's been really great so far but i ran into an issue when trying to use `flag.NoOptDefVal` detailed in...

_(current output edited, actual: `-C, -- string`, https://github.com/spf13/pflag/issues/139)_ ``` Flags: -C string Act on path instead of working directory. -h, --help help for git-id ``` ^ right now it says...

Hi, I think it would be useful if pflag could allow defining slice of FlagSets so we can do the following: ```bash markdown render \ --line --column="Go" --column="golang" --left-aligned \...

When creating the help text for a flag, the default value shouldn't be be excaped. It isn't clear to an end user that we would be escaping those values. Instead...

This PR adds support for flag grouping. `Group` can be set either directly on `Flag` or using `SetGroup()` function. A new function `Groups()` can be used to obtain a list...