Dan Buch
32ebecfbb5
Merge remote-tracking branch 'origin/master' into v2
2016-05-09 11:18:21 -04:00
01857ac337
Merge pull request #402 from codegangsta/v1.17.0-prep
...
Preparing for v1.17.0 release
2016-05-09 11:13:33 -04:00
Dan Buch
2fcbd9d729
Preparing for v1.17.0 release
2016-05-09 10:52:31 -04:00
1d47addf28
Merge pull request #401 from mattfarina/cleanup
...
Code cleanup from Go Report Card
2016-05-09 10:45:19 -04:00
Matt Farina
07ce8bf79c
Cleaned up else per golint
...
When an if ends in a return the else is not required. golint
detects these conditions and found these.
2016-05-09 10:15:05 -04:00
Matt Farina
2f110bd745
Cleaned up exported func comments per golint
2016-05-09 10:12:59 -04:00
Matt Farina
2f4ec31264
Fixed spelling and gofmt issues
2016-05-09 09:40:09 -04:00
Dan Buch
bac790c819
Merge remote-tracking branch 'origin/master' into v2
2016-05-09 08:00:13 -04:00
63ed8b0bde
Merge pull request #399 from codegangsta/exit-nonzero-for-unknown-subcommand
...
Exit non-zero if a unknown subcommand is given
2016-05-09 01:05:34 -04:00
Dan Buch
5a5fa990e1
Merge remote-tracking branch 'origin/master' into exit-nonzero-for-unknown-subcommand
2016-05-09 00:59:36 -04:00
9c9a8d8c1d
Merge pull request #398 from codegangsta/do-not-reorder-flags
...
Remove reordering of flags and arguments
2016-05-09 00:52:54 -04:00
8ef3b8f7bb
Merge pull request #397 from codegangsta/add-global-boolt
...
Add context.GlobalBoolT
2016-05-09 00:51:31 -04:00
Dan Buch
5704421e7b
Merge remote-tracking branch 'origin/master' into add-global-boolt
2016-05-09 00:44:27 -04:00
Jesse Szwedko
28eb7b2cc4
Added Hidden command support to CHANGELOG
2016-05-08 21:03:02 -07:00
Jesse Szwedko
cf4a731612
Merge pull request #386 from codegangsta/psmit-hidden_command
...
Merging #180 @psmit hidden command impl
2016-05-08 21:01:54 -07:00
Dan Buch
dfa9a87bee
Add tests for App.VisibleCategories & App.VisibleCommands
2016-05-08 23:54:12 -04:00
Dan Buch
97d2df6dd7
Merge remote-tracking branch 'origin/master' into psmit-hidden_command
2016-05-08 18:44:38 -04:00
ade5513337
Merge pull request #393 from mattfarina/io-Writer
...
Provide a variable for writing output (the writer) with a default of os.Stderr
2016-05-08 18:39:04 -04:00
Jesse Szwedko
592f1d97e5
Exit non-zero if a unknown subcommand is given
...
Currently it just prints the help message and exits 0.
We do this by modifying the helpCommand and helpSubcommand cli.Commands
to return an error if they are called with an unknown subcommand. This
propogates up to the app which exits with 3 and prints the error.
Thanks to @danslimmon for the initial approach!
Fixes #276
2016-05-07 17:26:15 -07:00
Jesse Szwedko
f585ec7cb8
Remove reordering of flags and arguments
...
This was introduced by #36 , but only worked in the specific case of all
arguments being passed before all flags. If the user mixed them, they
ended up with odd parsing behavior where the arguments were reordered
(causing #103 and #355 ).
Given the tradeoffs I think we should remove support for flag
reordering.
Fixes #103
Fixes #355
2016-05-07 16:36:54 -07:00
Jesse Szwedko
e3ace79a91
Add GlobalBoolT
...
Fixes #206
2016-05-07 16:11:26 -07:00
Jesse Szwedko
d3a4d5467b
Merge pull request #394 from mattfarina/travis-update
...
Update travis config for Go versions
2016-05-06 22:55:08 -07:00
Jesse Szwedko
d919ffad32
Merge pull request #395 from mattfarina/goreportcard
...
Adding Go Report Card badge
2016-05-06 22:54:45 -07:00
Matt Farina
0a3c5e7516
Letting Travis CI select the patch version of Go 1.4 to use
...
The last release of Go 1.4 when installed on Travis CI does not
have go vet installed. Letting Travis CI select the patch version
instead.
2016-05-06 12:30:30 -04:00
Matt Farina
e9970b7b13
Adding Go Report Card badge
2016-05-06 12:24:51 -04:00
Matt Farina
cd230f3a88
Update travis config for Go versions
...
- Added Go 1.6 testing
- Updated 1.5.x and 1.4.x to latest point releases
2016-05-06 12:19:01 -04:00
Matt Farina
6f0b442222
Update to ErrWriter and make available on app
2016-05-06 12:14:26 -04:00
Jesse Szwedko
eb8680b7d7
Merge pull request #392 from codegangsta/string-slice-overwrite-on-set
...
Overwrite slice flag defaults when set
2016-05-05 08:42:14 -07:00
Matt Farina
2a256d4c53
Provide a variable for writing output with a default of os.Stderr
2016-05-05 10:26:53 -04:00
Dan Buch
a4590caea5
Merge remote-tracking branch 'origin/v2' into string-slice-overwrite-on-set
2016-05-05 10:16:58 -04:00
75b97d09d9
Merge pull request #390 from codegangsta/readme-example-touchup
...
Assert output in some README examples
2016-05-04 20:04:10 -04:00
Dan Buch
11ad2b36c8
Assert output in some README examples
2016-05-04 19:41:33 -04:00
Dan Buch
cc481d6b0e
Adjust command hiding to use similar convention as hidden flags
...
plus breaking out "setup" portion of `App.Run` into its own method, cleaning up
some bits of the help templates, and allowing for runtime opt-in of displaying
template errors to stderr.
2016-05-03 06:54:05 -04:00
Dan Buch
f397b1618c
Adding test for Command.Hidden handling in help text
2016-05-03 05:51:26 -04:00
Dan Buch
5c641d69b4
Merge branch 'hidden_command' of https://github.com/psmit/cli into psmit-hidden_command
2016-05-03 05:50:36 -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
Jesse Szwedko
839f07bfe4
Merge pull request #381 from codegangsta/pluggable-flag-printer
...
Allow for pluggable flag-level help text formatting
2016-05-02 21:17:00 -07:00
b14dcdb7b9
TRIVIAL the letter "a"
2016-05-02 21:20:23 -04:00
Dan Buch
cd92adcb75
Further simplifying default flag stringer func
2016-05-02 19:58:16 -04:00
Dan Buch
6089d723a8
Use existing prefixedNames
func
2016-05-02 19:52:39 -04:00
Dan Buch
7de151883c
Added more notes about usage formatting changes
2016-05-02 19:48:35 -04:00
Dan Buch
e56207bd51
Merge branch 'vieux-change_varargs_usage' into pluggable-flag-printer
2016-05-02 19:45:56 -04:00
Dan Buch
2e4d25db14
Merge branch 'change_varargs_usage' of https://github.com/vieux/cli into vieux-change_varargs_usage
2016-05-02 19:45:21 -04:00
Dan Buch
69a8e25f3d
Make flag usage rendering more consistent; show default values
2016-05-02 19:42:08 -04:00
Dan Buch
23af5dd643
Rename flag stringer func bits for clarity, consistency
2016-05-02 13:07:57 -04:00
Dan Buch
22773b14c1
Allow for pluggable flag-level help text formatting
...
by defining `cli.DefaultFlagStringFunc` with a default value that uses
`withEnvHint`, conditionally running a given flag's `FormatValueHelp` if
present.
Closes #257
2016-05-02 13:05:21 -04:00
415b5e766a
Merge pull request #380 from codegangsta/readme-cli-refs
...
Change refs from `cli.go` to cli
2016-05-02 12:06:58 -04:00
Dan Buch
5c36fa18d9
Change refs from cli.go
to cli
...
since the days of this being a single-file library are long gone.
2016-05-02 11:51:54 -04:00
d69b4400b5
Merge pull request #379 from codegangsta/v1.16.0-prep
...
Version 1.16.0 prep
2016-05-02 11:49:06 -04:00
Dan Buch
edc8458637
Merge branch 'PaulMakepeace-fix-err-assertion' into v1.16.0-prep
2016-05-02 11:42:18 -04:00