| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2025-08-29 | Reset args on re-parse even if emptyreset-args-even-if-empty | Tomas Aschan | |
| This ensures fs.Args() returns the expected thing after every parse. Fixes #439. | |||
| 2025-08-29 | Merge pull request #407 from tmc/fix-errhelp | Tomas Aschan | |
| flag: Emulate stdlib behavior and do not print ErrHelp | |||
| 2025-08-29 | Merge branch 'master' into fix-errhelp | Tomas Aschan | |
| 2025-08-02 | Merge pull request #330 from pohly/copy-to-go-flagset | Tomas Aschan | |
| implement CopyToGoFlagSet | |||
| 2025-08-02 | Merge pull request #438 from mologie/fix-time-default-text | Tomas Aschan | |
| Omit zero time.Time default from usage line | |||
| 2025-07-30 | add CopyToGoFlagSet | Patrick Ohly | |
| 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 backward compatibility with previous releases, in particular support for single-dash flags. Without this in pflag, such tools have to resort to copying via the public API, which leads to less useful help messages (type of basic values will be unknown). | |||
| 2025-07-24 | Omit zero time.Time default from usage line | Oliver Kuckertz | |
| This was missed in #348, there previously was no way to omit the default value. Treating zero timestamp values as canary for absence of a default is in line with other flag types, e.g. zero ints. | |||
| 2025-07-17 | Merge pull request #261 from dubrie/master | Tomas Aschan | |
| Switching from whitelist to Allowlist terminology. Fixes #294 | |||
| 2025-07-17 | Merge pull request #364 from vaguecoder/duplicate-error | Tomas Aschan | |
| Remove Redundant "Unknown-Flag" Error | |||
| 2025-07-17 | Ensure output is written also from ParseAll | Tomas Aschan | |
| 2025-07-17 | Ensure output is written to correct stream | Tomas Aschan | |
| 2025-07-16 | Merge pull request #348 from max-frank/add-time-flag-supportv1.0.7 | Tomas Aschan | |
| Add support for time.Time flags | |||
| 2025-07-16 | Reduce duplication by forwarding to sibling functions | Tomas Aschan | |
| 2025-07-16 | Don't export `TimeValue` (yet) | Tomas Aschan | |
| 2025-07-14 | Remove unnecessary time test stderr dev null redirect | Maximilian Frank | |
| 2025-07-14 | Use time.Time for expectations in time flag tests | Maximilian Frank | |
| 2025-07-14 | Add support for time.Time flags | Maximilian Frank | |
| 2025-06-28 | Merge pull request #431 from LeGEC/430-fix-usage-message-for-func-flags | Tomas Aschan | |
| fix usage message for func flags, fix arguments order | |||
| 2025-06-27 | fix discrepancy in order of arguments for Func() and BoolFunc() #433 | Georges Varouchas | |
| for no good reason: the order of arguments would differ when calling pflag.BoolFuncP(...) and (*FlagSet).BoolFuncP(...) (same goes for Func() and FuncP()) in this commit: align all functions on stdlib's order fixes #433 | |||
| 2025-06-09 | fix help message for Func and BoolFunc flags #430 | Georges Varouchas | |
| * have '.Type()' for boolfuncValue return "boolfunc" (dedicated value, which now makes it distinct from funcValue) * hide extra "(default )" by stating that "" should be treated as a zero value for a boolFlag note: - a boolfuncValue matches 'case boolFlag:', as it implements the boolFlag interface, - treating "" as a value which shouldn't trigger a "(default )" for a regular Bool flag does not look like a breaking change * hide extra "[=something]" for boolfuncValue * set default placeholder name for "boolfunc" and "func" flag types | |||
| 2025-06-09 | minor: fix typos in comments | Georges Varouchas | |
| 2025-06-01 | Merge pull request #409 from ShawnJeffersonWang/master | Tomas Aschan | |
| fix: correct argument length check in FlagSet.Parse | |||
| 2025-05-24 | Merge pull request #429 from LeGEC/426-add-func-and-bool-func | Tomas Aschan | |
| add support for Func() and BoolFunc() #426 | |||
| 2025-05-22 | add support for Func() and BoolFunc() #426 | Georges Varouchas | |
| Add support for two features which landed in the 'flag' package from the standard library: Func() and BoolFunc() and their two pflag specific versions: FuncP() and BoolFuncP() fixes #426 | |||
| 2025-05-15 | Merge pull request #418 from hujun-open/master | Tomas Aschan | |
| add support equivalent to golang flag.TextVar(), also fixes the test failure as described in #368 | |||
| 2025-05-14 | Merge pull request #424 from valdar/issue/423 | Tomas Aschan | |
| fix #423 : Add helper function and some documentation to parse shorthand go test flags. | |||
| 2025-05-14 | fix #423 : Add helper function and some documentation to parse shorthand go ↵ | Andrea Tarocchi | |
| test flags. | |||
| 2025-05-10 | - update text_test.go based on PR review comments | Hu Jun | |
| - return is missing in one error path of GetText(), fixed | |||
| 2025-05-07 | Merge pull request #428 from co63oc/fix1 | Tomas Aschan | |
| Fix typos | |||
| 2025-05-06 | Fix typos | co63oc | |
| 2025-04-28 | Merge remote-tracking branch 'upstream/master' | Hu Jun | |
| 2025-04-22 | Merge pull request #425 from eth-p/error-structs | Tomas Aschan | |
| feat: Use structs for errors returned by pflag. | |||
| 2025-04-21 | test: Add tests for error structs | Ethan P. | |
| 2025-04-21 | feat: Add getters to error structs | Ethan P. | |
| 2025-04-21 | feat: Use error structs for most returned errors | Ethan P. | |
| This allows callers to differentiate between error types without having to parse the error message string. | |||
| 2025-04-21 | test: Commonly-returned error messages | Ethan P. | |
| Add tests to ensure invalid arguments and unknown flag error messages don't change. | |||
| 2025-04-01 | Merge pull request #422 from ↵ | Tomas Aschan | |
| MidnightRocket/fix-default-is-zerovalue-for-generic-value-type Fix defaultIsZeroValue check for generic Value types | |||
| 2025-04-01 | Improve readability for error in TestPrintDefaults | MidnightRocket | |
| 2025-04-01 | Add better test for defaultIsZeroValue for generic Value type | MidnightRocket | |
| 2025-03-18 | Fix defaultIsZeroValue check for generic Value type | MidnightRocket | |
| 2025-03-08 | Merge remote-tracking branch 'upstream/master' | Hu Jun | |
| 2025-01-09 | Merge pull request #419 from spf13/civ1.0.6 | Márk Sági-Kazár | |
| add github actions | |||
| 2025-01-09 | disable unsupported dependency graph for now | Mark Sagi-Kazar | |
| Signed-off-by: Mark Sagi-Kazar <[email protected]> | |||
| 2025-01-09 | fix govet | Mark Sagi-Kazar | |
| Signed-off-by: Mark Sagi-Kazar <[email protected]> | |||
| 2025-01-09 | add github actions | Mark Sagi-Kazar | |
| Signed-off-by: Mark Sagi-Kazar <[email protected]> | |||
| 2024-12-27 | add support equivalent to golang flag.TextVar(), also fixes the test failure ↵ | Hu Jun | |
| as described in #368 | |||
| 2024-12-05 | fix: add test for argument length check | shawn | |
| 2024-07-23 | fix: correct argument length check in FlagSet.Parse | shawn | |
| Signed-off-by: shawn <[email protected]> | |||
| 2024-06-12 | flag: Emulate stdlib behavior and do not print ErrHelp | Travis Cline | |
| 2022-11-19 | Remove Redundant "Unknown-Flag" Error | Bhargav Ravuri | |
| Signed-off-by: Bhargav Ravuri <[email protected]> | |||
