Repository navigation
Releases
v1.1.0
It's been long enough, and enough things have been fixed, that it might be time to release a new version, even if there isn't any particular big new issue to market as the reason for this release.
If you notice anything breaking, it is entirely un-intentional, but you might also have been relying on undocumented or buggy behavior. Please file an issue describing what you're doing, how it worked before this release and why it doesn't work anymore, and pin your projects to v1.0.10 (the latest release before this one) while we decide how to address your concerns.
What's Changed
- README: update badges and minor linting fixes by @thaJeztah in #452
- Show 'correct' explicit bool value syntax in help by @alimpfard in #453
- Fix for Go 1.24 by @pterjan in #460
- fix(map): ensure string-to-string flags maintain stable pointers by @brandon1024 in #457
- Fix getFlagType error message by @wellitonscheer in #462
- update actions, and fix linting issues by @thaJeztah in #450
- fix: README.md indicating the use of godoc(deprecated) by @malklera in #467
- Fix broken link to POSIX argument conventions by @tomasaschan in #464
- Replace raw stdlib parse errors in typed flag Set methods (#269) by @reuvenharrison in #469
- Extend
UnknownFlagstoUnknownFlagsHandlingand introducePassUnknownFlagToArgs(#337) by @ikedam in #440 - fix: allow nil default IP flags in GetIP by @happysnaker in #483
- fix: allow hex input in UintSlice by @happysnaker in #484
- fix: honor custom IsBoolFlag compatibility by @happysnaker in #487
- docs: clarify SortFlags example with complete runnable program by @happysnaker in #488
- docs: add release process documentation by @happysnaker in #490
- fix: print to set destination, not hardcoded os.Stderr by @quite in #502
- ci: bump golangci-lint to v2.13 for Go 1.27 by @hdimer in #508
- Initialize the target map when a StringToString flag has a nil default by @nikolauspschuetz in #506
- fix: honour deprecated ParseErrorsWhitelist.UnknownFlagsHandling by @lenamonj in #507
- test: add StringSlice Append coverage by @LY-19418 in #504
- Keep wrapping after an unbreakable usage word by @AzazelSensei in #503
- Validate IP slice values before appending or replacing by @agammann in #513
- fix(ci): Use the latest golangci-lint release by @tomasaschan in #525
- Reject IPv6 addresses as IPv4 masks by @yuefdev in #524
- Report the flag name as typed in deprecation warnings by @hdimer in #500
- Document non-interspersed argument parsing by @yuefdev in #523
- Preserve trailing whitespace in StringToString formatting by @r4venrudy in #522
- Reject extra CSV records in StringToString arguments by @Harshil-1603 in #521
- Preserve current string values in CopyToGoFlagSet by @adenzhou1350 in #520
- Fix type identification and mismatch checks for text flags by @dewanshshekhar in #526
- fix: enforce native integer flag bounds on 32-bit platforms by @gdpu11 in #534
- fix: preserve count flag values when parsing fails by @gdpu11 in #533
New Contributors
- @alimpfard made their first contribution in #453
- @pterjan made their first contribution in #460
- @brandon1024 made their first contribution in #457
- @wellitonscheer made their first contribution in #462
- @malklera made their first contribution in #467
- @reuvenharrison made their first contribution in #469
- @ikedam made their first contribution in #440
- @happysnaker made their first contribution in #483
- @quite made their first contribution in #502
- @hdimer made their first contribution in #508
- @nikolauspschuetz made their first contribution in #506
- @lenamonj made their first contribution in #507
- @LY-19418 made their first contribution in #504
- @AzazelSensei made their first contribution in #503
- @agammann made their first contribution in #513
- @yuefdev made their first contribution in #524
- @r4venrudy made their first contribution in #522
- @Harshil-1603 made their first contribution in #521
- @adenzhou1350 made their first contribution in #520
- @dewanshshekhar made their first contribution in #526
- @gdpu11 made their first contribution in #534
Full Changelog: v1.0.10...v1.1.0
v1.0.10
What's Changed
- fix deprecation comment for (FlagSet.)ParseErrorsWhitelist by @thaJeztah in #447
- remove uses of errors.Is, which requires go1.13, move go1.16/go1.21 tests to separate file by @thaJeztah in #448
New Contributors
- @thaJeztah made their first contribution in #447
Full Changelog: v1.0.9...v1.0.10
v1.0.9
What's Changed
- fix: Restore ParseErrorsWhitelist name for now by @tomasaschan in #446
Full Changelog: v1.0.8...v1.0.9
v1.0.8
⚠️ Breaking Change
This version, while only a patch bump, includes a (very minor) breaking change: the flag.ParseErrorsWhitelist struct and corresponding FlagSet.parseErrorsWhitelist field have been renamed to ParseErrorsAllowlist.
This should result in compilation errors in any code that uses these fields, which can be fixed by adjusting the names at call sites. There is no change in semantics or behavior of the struct or field referred to by these names. If your code compiles without errors after bumping to/past v1.0.8, you are not affected by this change.
The breaking change was reverted in v1.0.9, by means of re-introducing the old names with deprecation warnings. The plan is still to remove them in a future release, so if your code does depend on the old names, please change them to use the new names at your earliest convenience.
What's Changed
- Remove Redundant "Unknown-Flag" Error by @vaguecoder in #364
- Switching from whitelist to Allowlist terminology by @dubrie in #261
- Omit zero time.Time default from usage line by @mologie in #438
- implement CopyToGoFlagSet by @pohly in #330
- flag: Emulate stdlib behavior and do not print ErrHelp by @tmc in #407
- Print Default Values of String-to-String in Sorted Order by @vaguecoder in #365
- fix: Don't print ErrHelp in ParseAll by @tomasaschan in #443
- Reset args on re-parse even if empty by @tomasaschan in #444
New Contributors
- @vaguecoder made their first contribution in #364
- @dubrie made their first contribution in #261
- @mologie made their first contribution in #438
- @pohly made their first contribution in #330
- @tmc made their first contribution in #407
- @tomasaschan made their first contribution in #443
Full Changelog: v1.0.7...v1.0.8
v1.0.7
What's Changed
- Fix defaultIsZeroValue check for generic Value types by @MidnightRocket in #422
- feat: Use structs for errors returned by pflag. by @eth-p in #425
- Fix typos by @co63oc in #428
- fix #423 : Add helper function and some documentation to parse shorthand go test flags. by @valdar in #424
- add support equivalent to golang flag.TextVar(), also fixes the test failure as described in #368 by @hujun-open in #418
- add support for Func() and BoolFunc() #426 by @LeGEC in #429
- fix: correct argument length check in FlagSet.Parse by @ShawnJeffersonWang in #409
- fix usage message for func flags, fix arguments order by @LeGEC in #431
- Add support for time.Time flags by @max-frank in #348
New Contributors
- @MidnightRocket made their first contribution in #422
- @eth-p made their first contribution in #425
- @co63oc made their first contribution in #428
- @valdar made their first contribution in #424
- @hujun-open made their first contribution in #418
- @LeGEC made their first contribution in #429
- @ShawnJeffersonWang made their first contribution in #409
- @max-frank made their first contribution in #348
Full Changelog: v1.0.6...v1.0.7
v1.0.6
What's Changed
- Add exported functions to preserve
pkg/flagcompatibility by @mckern in #220 - remove dead code for checking error nil by @yashbhutwala in #282
- Add IPNetSlice and unit tests by @rpothier in #170
- allow for blank ip addresses by @duhruh in #316
- add github actions by @sagikazarmark in #419
New Contributors
- @mckern made their first contribution in #220
- @yashbhutwala made their first contribution in #282
- @rpothier made their first contribution in #170
- @duhruh made their first contribution in #316
- @sagikazarmark made their first contribution in #419
Full Changelog: v1.0.5...v1.0.6
1.0.5
Merge pull request #219 from cfromknecht/fix-mod Remove require pflag v1.0.3
v1.0.5-rc1
1.0.4
v1.0.4 Fix typo in go.mod