aboutsummaryrefslogtreecommitdiff
path: root/flag_test.go
AgeCommit message (Collapse)Author
2015-04-29Merge remote-tracking branch 'ogier/master' into mergeEric Paris
Conflicts: bool_test.go flag.go flag_test.go
2015-04-28Custom normalization funcEric Paris
This can be used however you want. My test is for flag aliases
2015-04-28Ability to mark flags as deprecatedEric Paris
They will not show up in usage or help, but they will still work. The usage message will print on os.Stderr any time the flag is set.
2015-04-27Merge pull request #12 from fabianofranz/masterEric Paris
Add support to short form with equal sign: -p=value
2015-04-23Allow WordSeparators to be set after flags are addedTim Hockin
2015-04-24Allow flag name normalization for compareTim Hockin
This allows the FlagSet to define equivalent word-separators. Given this, one can make - and _ equivalent, so --foo-bar and --foo_bar both work.
2015-04-22Add support to short form with equal sign: -p=valuefabianofranz
2015-02-17Fix handling of -- terminationAndy Goldstein
Fix handling of -- termination. Previously, if you ran $command -flag1 -etc -- some args after the command's args would be doubled (some args after some args after). Additionally, if there were items after the -- termination that looked like flags, the parser would throw an error. It's better to terminate parsing when -- is seen, because that usually indicates the caller wants to pass the remainder of the arguments (including flags) as-is to something else.
2015-02-14Move test files to the 'pflag' packageAlex Ogier
This means we can avoid putting the repository name into the source files, so people who have their own forks don't have to make changes.
2015-01-16Fix unit tests to include Type() method in custom typesFilipe Brandenburger
This was broken by commit 463bdc838f2b35 ("Adding Type() method to the values.") which added the method to the interface but did not update the custom types in unit tests. Signed-off-by: Filipe Brandenburger <[email protected]>
2014-06-27Fixing issues so test pass againspf13
2014-04-02Compatibility: commandLine -> CommandLineAlec Thomas
2012-12-20Set interspersed behaviour via a setter.Alec Thomas
2012-12-19Add support for non-interspersed option/non-option args.Alec Thomas
2012-05-09Tighten up parsing to be less ambiguous, follow GNU conventionsAlex Ogier
2012-05-04Import the full github path in testsAlex Ogier
2012-05-04Fix tests for interspersed parsingAlex Ogier
2012-05-04Fix up tests to use long -- formAlex Ogier
2012-04-30Rename package flag --> pflagAlex Ogier
2012-04-26Copy the flag module from the go standard libraryAlex Ogier