| 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 branch 'master' into fix-errhelp | Tomas Aschan | |
| 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-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-01 | Merge pull request #409 from ShawnJeffersonWang/master | Tomas Aschan | |
| fix: correct argument length check in FlagSet.Parse | |||
| 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-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-03-18 | Fix defaultIsZeroValue check for generic Value type | MidnightRocket | |
| 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]> | |||
| 2020-06-02 | Switching from whitelist to Allowlist terminology | Bill Johnson | |
| 2020-05-04 | Add exported functions to preserve `pkg/flag` compatibility (#220) | Ryan McKern | |
| * Rename out() to Output() This brings behavior inline with go's flag library, and allows for printing output directly to whatever the current FlagSet is using for output. This change will make it easier to correctly emit output to stdout or stderr (e.g. a user has requested a help screen, which should emit to stdout since it's the desired outcome). * improve compat. with pkg/flag by adding Name() pkg/flag has a public `Name()` function, which returns the name of the flag set when called. This commit adds that function, as well as a test for it. * Streamline testing Name() Testing `Name()` will move into its own explicit test, instead of running inline during `TestAddFlagSet()`. Co-authored-by: Chloe Kudryavtsev <[email protected]> Co-authored-by: Chloe Kudryavtsev <[email protected]> | |||
| 2019-09-17 | Merge pull request #216 from therealmitchconnors/elegant | Mitch Connors | |
| Implement SliceValue for better list semantics | |||
| 2019-09-10 | Add SliceValue Comments | therealmitchconnors | |
| 2019-08-16 | Add first SliceValue implementations | therealmitchconnors | |
| 2019-06-16 | Fix package doc | David Schneider | |
| Signed-off-by: David Schneider <[email protected]> | |||
| 2018-08-31 | Fix panic when parsing unknown flag followed by empty argument (#173)v1.0.3 | Oren Shomron | |
| Signed-off-by: Oren Shomron <[email protected]> | |||
| 2018-06-01 | Allow bubbling up of -test.* flags (#169) | Joffrey F | |
| Based on patch suggested here: https://github.com/spf13/cobra/issues/597#issuecomment-385984076 | |||
| 2018-04-12 | Typo correction in flag.go (#164)v1.0.1 | Saakallya Biswas | |
| 2018-04-10 | Allow Users To Show Deprecated Flags (#163) | Eric Paris | |
| They have to explicitly unhide a deprecated flag to keep the current behavior. | |||
| 2018-04-03 | make x.Parsed() return true after AddGoFlagSet(x) and pflag.Parse() (#162) | childe | |
| * make GoFlagSets.Parsed() true after pflag.Parse some third part lib such as glog use go flag package, and its some actions depends on if goflag.Parsed(). * add test case for goflag.CommandLine.Parsed() * add comment to goflag.CommandLine.Parsed test case | |||
| 2018-03-30 | add ability to ignore unknown flags (#160) | Rajat Jindal | |
| * add ability to ignore unknown flags * add testcases * add 2 more patterns to the testcase * handle --unknownflag=val arg and -u=val arg scenario * add ParseErrorsWhiteList to extend error handling during parsing | |||
| 2018-03-28 | Add multiline wrapping support (#155) | mkishere | |
| * Add multiline wrapping support With reference to golang/go#20799, pflag now will respect newline in usage string and do wrap accordingly. Also add test cases for testing * Break at \n only if \n pos<wrap | |||
| 2017-11-06 | Add uintSlice and boolSlice to name prettifier (#150) | Steven Roose | |
| 2017-10-20 | Prevent printing when using ContinueOnError (#144) | Steven Roose | |
| 2017-10-05 | Fixing Count flag usage string (#141) | gonix | |
| 2017-10-02 | Fix SetNormalizeFunc (#137) | Diego Becciolini | |
| Related to https://github.com/spf13/cobra/issues/521 | |||
| 2017-09-30 | Generate flag error output for errors returned from the parseFunc (#138) | Michael Porter | |
| 2017-09-01 | New: renamed intSlice to ints in usage | Christophe Serafin | |
| 2017-09-01 | New: added a default name to avoid stringSlice in the usage message. | Christophe Serafin | |
| 2017-05-05 | Testing for Shorthand Lookup | Eric Paris | |
| 2017-05-05 | Add example to ShorthandLookup | Albert Nigmatzianov | |
| 2017-05-05 | Add note about panic in ShorthandLookup | Albert Nigmatzianov | |
| 2017-05-05 | Allow lookup by shorthand (#106) | Charlie R.C | |
| 2017-04-27 | Unify error message for panic and f.out | Albert Nigmatzianov | |
| 2017-04-26 | Use comparison a string with "" instead of comparison of len | Albert Nigmatzianov | |
| 2017-04-26 | Prevent parsing if there are no arguments | Albert Nigmatzianov | |
| 2017-04-26 | Add more verbosity to panic of shorthand redefinition | Albert Nigmatzianov | |
| See https://github.com/spf13/cobra/issues/27#issuecomment-294690084 | |||
| 2017-04-26 | Use f.out in output flag deprecation | Albert Nigmatzianov | |
| 2017-04-26 | Make more detailed error in Set | Albert Nigmatzianov | |
| 2017-04-26 | Add comments for better understanding of parsing short flags | Albert Nigmatzianov | |
| 2017-04-26 | Delete setFlag | Albert Nigmatzianov | |
| 2017-04-26 | Fix alreadythere variable name | Albert Nigmatzianov | |
| In some cases "exists" is better to understand | |||
| 2017-04-18 | Merge pull request #119 from bogem/cachesortede | Albert Nigmatzianov | |
| Cache sorted flags | |||
| 2017-04-17 | Merge pull request #75 from jonathanmarvens/patch-1 | Albert Nigmatzianov | |
| Removed unused field "exitOnError". | |||
