Commit Graph

15 Commits

Author SHA1 Message Date
Dan Buch
cd10b49473
Minimize struct copying
by using pointer func receivers and slices of struct pointers where possible.
2016-05-22 15:20:52 -04:00
Dan Buch
81fcf706ea
Replace all "stringly typed" fields with slice equivalents
and alter the Flag interface accordingly

Closes #415
2016-05-21 21:29:45 -04:00
Dan Buch
f2d5ed9933
Replace BoolTFlag type with BoolFlag.Value
Closes #412
2016-05-18 08:20:15 -04:00
Dan Buch
bef835d455
Remove all Context.Global* methods
and change the behavior of the non-Global variants to always search up the
context lineage.

Closes #385
2016-05-16 10:18:15 -04:00
Dan Buch
a1e5328e30
Merge remote-tracking branch 'origin/master' into string-slice-flag-default-160 2016-05-03 05:25:07 -04:00
Dan Buch
fed78b8bab
Rework of hidden flag impl plus some Action func corrections 2016-05-01 08:36:17 -04:00
15d4455a61 Merge pull request #365 from roboll/nested-flags
altsrc: allow nested defaults in yaml files
2016-04-30 13:25:48 -04:00
Dan Buch
1fb52b3bce
Merge remote-tracking branch 'origin/master' into string-slice-flag-default-160 2016-04-30 13:13:02 -04:00
rob boll
36a5323a47 altsrc: allow nested defaults in yaml files
Previously, defaults specified as nested keys in a yaml file would not
be recognized, i.e. `top: \n  bottom: key` would not be accessible using
the name `top.bottom`, but `top.bottom: key` would. These changes
support using nested keys by traversing the configuration tree if the
key name uses '.' as a delimiter.
2016-04-29 13:28:59 -04:00
Dan Buch
b7329f4968
Switch from multi-return with exit codes to ExitCoder check 2016-04-27 09:12:34 -04:00
Dan Buch
a17c8cf1d8
Rename func type suffixes Fn->Func and add OnUsageErrorFunc 2016-04-25 18:29:05 -04:00
Dan Buch
10c8309d84
Merge branch 'develop' of https://github.com/txgruppi/cli into txgruppi-develop 2016-04-25 18:10:10 -04:00
Dan Buch
867aa0912d Overwrite slice flag defaults when set
Closes #160
2016-04-05 12:35:30 -04:00
Yasuhiro KANDA
ad7ed77a7e Fix yaml file loader
* fix typo (yamlSourceLoader -> yamlSourceContext)
* fix function return type (NewYamlSourceFromFlagFunc)

Also fixed build tags to properly build on >=go1.2

Signed-off-by: Jesse Szwedko <jesse.szwedko@gmail.com>
2016-03-20 12:42:00 -07:00
chrisprobinson
d3b02e41b0 Update to add build contraints to not compile in yaml support
in the case the golang version is less than golang 1.2
2016-02-21 20:06:02 -08:00