| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2015-08-05 | Merge pull request #37 from eparis/ip-tests | Eric Paris | |
| Two New Flag Types - IPNet and Count | |||
| 2015-08-05 | New counter flag type | Eric Paris | |
| ``` -vvv ``` Will give a value of 3 ``` -v=4 -v ``` Will give a value of 5 | |||
| 2015-08-05 | Add new net.IPNet flag type | Eric Paris | |
| 2015-08-05 | Add _test for the net.IP flag type | Eric Paris | |
| 2015-08-05 | Merge pull request #36 from eparis/empty-slices | Eric Paris | |
| Empty slices should be empty - not length 1 with an empty string | |||
| 2015-08-05 | Do not include \n in Errorf output | Eric Paris | |
| 2015-08-05 | Empty slices should be empty, not have a single (empty) string | Eric Paris | |
| 2015-08-05 | Merge pull request #35 from eparis/slice-multi-call | Eric Paris | |
| String and Int slices called twice should append not overwrite | |||
| 2015-08-05 | String and Int slices called twice should append not overwrite | Eric Paris | |
| This allows users to do things like ``` cmd --filename=file1 --filename=file2 --filename=file3,file4 ``` And internally we will get ``` []string{"file1", "file2", "file3", "file4"} ``` | |||
| 2015-08-05 | Merge pull request #34 from eparis/slice-show-bracket | Eric Paris | |
| Show [] around string slices when showing the text | |||
| 2015-08-05 | Show [] around string slices when showing the text | Eric Paris | |
| This means things like autogenerated docs will show `--filename=[]` instead of just `--filename=` | |||
| 2015-06-22 | Merge pull request #30 from eparis/docs | Eric Paris | |
| docs | |||
| 2015-06-22 | docs | Eric Paris | |
| 2015-06-22 | Merge pull request #20 from eparis/optional-args | Eric Paris | |
| Fix '--flag arg' and Allow flags to take optional arguments | |||
| 2015-06-22 | Add support for '--flag arg' | Eric Paris | |
| 2015-06-22 | Set default values if no arg given | Eric Paris | |
| 2015-06-22 | Merge pull request #27 from eparis/SliceStrings | Eric Paris | |
| Add new StringSlice and IntSlice flag types | |||
| 2015-06-22 | Tests for GetIntSlice and GetStringSlice | Eric Paris | |
| 2015-06-22 | Much like stringSlice, add intSlice flag type | Eric Paris | |
| 2015-06-22 | Add new StringSlice flag type | Eric Paris | |
| Arguments passed on the command line will be split on "," and will be stored in a slice. We can see this already exits in codegangsta/cli https://github.com/codegangsta/cli/blob/44d40054fa6208a3013d7217aca72a2b8b0f5a0b/flag.go#L102 And people have written their own implementations for cobra/pflag https://github.com/GoogleCloudPlatform/kubernetes/blob/c5ba95ee26cbec9694a780544b559a797956ea54/pkg/util/list.go Lets just make it a first class flag | |||
| 2015-06-22 | Merge pull request #25 from eparis/GetFlagType | Eric Paris | |
| Add new FlagSet.Get{Int,String,...} accessor functions | |||
| 2015-06-22 | Merge pull request #29 from liggitt/set_annotation | Eric Paris | |
| Add SetAnnotation helper | |||
| 2015-06-22 | Add SetAnnotation helper | Jordan Liggitt | |
| 2015-06-01 | Add new FlagSet.Get{Int,String,...} accessor functions | Eric Paris | |
| If I declared a bool flag named "hello" I can now call b, err := f.GetBool("hello") And b will hold the value of the flag We can see this is already done in https://github.com/codegangsta/cli/blob/bcec9b08c7e5564f7512ad7e7b03778fe1923116/context.go If people use the codegangsta/cli Other projects have done it themselves using pflags (what inspired this patch) https://github.com/GoogleCloudPlatform/kubernetes/blob/cd817aebd848facda29e0befbbd6e31bf22402e6/pkg/kubectl/cmd/util/helpers.go#L176 Lets just do it ourselves... | |||
| 2015-06-01 | Merge pull request #26 from eparis/moar-tests | Eric Paris | |
| Moar tests | |||
| 2015-06-01 | Moar flag_test! | Eric Paris | |
| 2015-06-01 | Remove Value.Get() interfaces | Eric Paris | |
| These were only defined for a couple for flag types (ip, ipmask, uint16, uint32) and weren't used anywhere. If you already knew the type well enough to know that it was one of the few with a Get() interface, you could cast yourself out of the Value... | |||
| 2015-05-27 | Merge pull request #24 from eparis/longArgCleanup | Eric Paris | |
| Slight code cleanup parsing long flags | |||
| 2015-05-27 | Slight code cleanup parsing long flags | Eric Paris | |
| 2015-05-19 | Added a test for normalizing usage name | Anastasis Andronidis | |
| [close #23] | |||
| 2015-05-12 | Fixed statement | Anastasis Andronidis | |
| 2015-05-12 | Normalization should change the name | Anastasis Andronidis | |
| 2015-05-10 | Merge pull request #22 from andronat/multiple_narmalization_requests | Eric Paris | |
| Call normalizeFlagName function only once | |||
| 2015-05-10 | Call normalizeFlagName function only once | Anastasis Andronidis | |
| 2015-05-08 | Merge pull request #21 from eparis/bool-equal-fix | Eric Paris | |
| Support bool= with shortnames | |||
| 2015-05-08 | Support bool= with shortnames | Eric Paris | |
| Currently a shortname bool variable b cannot use the -b=true -b=false form because the -b is assumed to mean true and the = format is never noticed. | |||
| 2015-05-08 | Merge pull request #19 from eparis/parse-rework | Bjørn Erik Pedersen | |
| Parse rework | |||
| 2015-05-08 | Rewrite short arg parsing for readability | Eric Paris | |
| new function to parse each arg (less indentation) make it clear what value is being set and where it came from | |||
| 2015-05-08 | parseLongArg code rework for readability | Eric Paris | |
| move the -- parsing up into the parent make it more obvious which values we are using | |||
| 2015-05-01 | Merge pull request #16 from eparis/merge | Steve Francia | |
| Merge ogier/pflag and enable travis | |||
| 2015-04-29 | Merge pull request #17 from eparis/NormalizeFuncReadme | Eric Paris | |
| Add docs and examples how to use the flag normalization func | |||
| 2015-04-29 | Add docs and examples how to use the flag normalization func | Eric Paris | |
| 2015-04-29 | Update travis for spf13 | Eric Paris | |
| 2015-04-29 | Merge remote-tracking branch 'ogier/master' into merge | Eric Paris | |
| Conflicts: bool_test.go flag.go flag_test.go | |||
| 2015-04-28 | Merge pull request #15 from eparis/generic-flag-normalization-thockin | Eric Paris | |
| Generic flag normalization | |||
| 2015-04-28 | Custom normalization func | Eric Paris | |
| This can be used however you want. My test is for flag aliases | |||
| 2015-04-28 | Make normalizedName external so we can make the functions external | Eric Paris | |
| 2015-04-28 | Merge pull request #9 from eparis/deprecated-flag | Eric Paris | |
| Ability to mark flags as deprecated | |||
| 2015-04-28 | Ability to mark flags as deprecated | Eric 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-27 | Merge pull request #10 from eparis/declare_by_name | Eric Paris | |
| Declare Flag{ by name instead of order | |||
