Commit Graph

474 Commits

Author SHA1 Message Date
e671f0b23b Merge pull request #339 from jack230230/master
Add App.Metadata
2016-04-30 09:36:46 -04:00
663fc0b623 Merge pull request #361 from codegangsta/txgruppi-develop
Optional exit code support
2016-04-30 08:14:08 -04:00
王振威
f72d405107 Change Extras to Metadata 2016-04-30 10:42:07 +08:00
Dan Buch
06c01a4bba
A few tweaks based on feedback in #361 2016-04-29 03:01:57 -04:00
Dan Buch
4cae17cfe1
Ensure MultiError returned when both Before and After funcs given 2016-04-28 17:15:16 -04:00
Dan Buch
61d4175525
Merge remote-tracking branch 'origin/master' into txgruppi-develop 2016-04-28 16:20:02 -04:00
222ec6fb7e Merge pull request #364 from codegangsta/assert-before-command-after-ordering
Revising/adding tests that assert order of operations inside App.Run
2016-04-28 16:12:29 -04:00
Dan Buch
6eb8c82596
Merge remote-tracking branch 'origin/master' into txgruppi-develop 2016-04-28 16:07:37 -04:00
Dan Buch
2c0e13ecf8
Revising/adding tests that assert order of operations inside App.Run 2016-04-28 16:05:14 -04:00
6e08192c80 Merge pull request #363 from codegangsta/global-float64
Add Context.GlobalFloat64 and tests
2016-04-28 13:51:20 -04:00
Dan Buch
b9bbb35c5b
Add change to Fixed section of Unreleased in CHANGELOG 2016-04-28 13:04:52 -04:00
Dan Buch
bd0f13d022
Add Context.GlobalFloat64 plus tests
Closes #362
2016-04-28 13:03:25 -04:00
Dan Buch
7651aa05a6
TRIVIAL specify *return* signature in deprecation message 2016-04-28 11:09:33 -04:00
Dan Buch
c3a6370616
Moving remaining details from #361 description to CHANGELOG.md 2016-04-28 11:07:53 -04:00
Dan Buch
b453bf5940
Clarifying errors returned from HandleAction + tests 2016-04-28 11:03:10 -04:00
Dan Buch
271b56c71b
Cleanups based on feedback in #361 2016-04-28 10:15:04 -04:00
Dan Buch
7371138edb
Add back App.RunAndExitOnError with deprecation message 2016-04-27 12:23:09 -04:00
Dan Buch
02924293ff
Removing unused vars 2016-04-27 11:51:41 -04:00
Dan Buch
9e8ead512a
Making gfmxr assertion stronger 2016-04-27 11:40:46 -04:00
Dan Buch
3b5133fbb1
Add gfmxr integration for checking examples in README.md
now that we support the legacy Action func signature.
2016-04-27 11:38:49 -04:00
Dan Buch
d45f7c1fe2
Allow for legacy and newer Action func signatures 2016-04-27 11:34:01 -04:00
Dan Buch
d48e22a9dd
Docs around exit error behavior, + handling MultiError in HandleExitCoder 2016-04-27 09:54:08 -04:00
Dan Buch
b2ac0616d1
TRIVIAL Remove trailing whitespace 2016-04-27 09:31:43 -04:00
Dan Buch
23c7b807a7
Merge remote-tracking branch 'origin/master' into txgruppi-develop 2016-04-27 09:30:05 -04:00
Dan Buch
882dd2cc6b
Making sure examples in README are valid 2016-04-27 09:21:56 -04:00
Dan Buch
f688d47415
Encapsulate ExitCoder check into a lil func 2016-04-27 09:18:42 -04:00
Dan Buch
f3e55a0783
Move error types to errors.go 2016-04-27 09:13:52 -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
b40b62794d
Ensure README examples are runnable 2016-04-26 07:05:50 -04:00
Jesse Szwedko
4733699ce3 Update changelog with placeholder support 2016-04-25 19:47:42 -07:00
Jesse Szwedko
7528b17cc6 Merge pull request #357 from kevin-cantwell/parse-usage-placeholders
Parses usage placeholders via back quotes. Resolves #333
2016-04-25 19:45:59 -07: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
8f4634de7c Merge pull request #360 from codegangsta/keep-a-changelog
Keep a changelog
2016-04-25 17:00:36 -04:00
Dan Buch
95d18920ad
Linkify release headings 2016-04-25 15:58:30 -04:00
Dan Buch
ed0056d1c1
Add CHANGELOG.md with backfilled releases 2016-04-25 15:48:21 -04:00
Kevin Cantwell
c1c8825a46 updates README with flag usage placeholder instructions 2016-04-25 10:53:40 -04:00
Kevin Cantwell
13b7eedc13 Parses usage placeholders via back quotes. Resolves #333 2016-04-21 23:04:01 -04:00
Jesse Szwedko
71f57d300d Merge pull request #349 from Felamande/master
use filepath.Base instead of path.Base in Name & HelpName as default.
2016-04-03 18:54:34 -07:00
Felamande
3fb51f15e8 use filepath.Base instead of path.Base in Name & HelpName as default values. 2016-04-03 17:50:08 +08:00
Jesse Szwedko
bc465beccc Merge pull request #346 from codegangsta/category_sort_2
Add option to make categories with command, to display a more structured help
2016-03-26 15:39:47 -07:00
Jesse Szwedko
9fec0fad02 Merge pull request #343 from TimeIncOSS/f-hide-version
Never show version if HideVersion=true
2016-03-21 23:42:55 -05:00
Radek Simko
d21170f0e3 Never show version if HideVersion=true 2016-03-21 16:12:46 +00:00
Jesse Szwedko
a7936f1d21 Merge pull request #342 from korzonek/master
codebeat badge
2016-03-20 15:44:03 -05: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
Jesse Szwedko
a7be4a3f19 Describe category behavior in README 2016-03-20 12:18:28 -07:00
Jesse Szwedko
042842b819 Remove CategorizedHelp from App and allow subcommands to have categories
Just place all subcommands in categories, the default category will be
"" which will properly format the output (and group commands that have
no category).

Also allow subcommands to have categories.

Lastly, augment the test to check the output.
2016-03-20 12:17:13 -07:00
Soulou
d0997e8f99 Set Categories as a read-only method and fix tests 2016-03-20 11:35:26 -07:00
Soulou
994a7028e2 Categories as slice, not a map anymore, order is always preserved 2016-03-20 11:35:25 -07:00
Soulou
a0801792cc Allow to sort commands by category 2016-03-20 11:32:58 -07:00