Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prerequisites
Put an
x
into the box(es) that apply:For more information, see the Contributing Guide.
Description
This PR replaces
docopt
with Cobra CLI library. Using Cobra will give flexibility in terms of new subcommands or flags, and grouping them together.Commands:
json
to generate json formattedpretty
to generate colorized pretty outputmarkdown
(md
as alias) to generate Markdown formattable
(tbl
alias) to generate Markdown Table formatdocument
(doc
alias) to generate Markdown Document formatversion
to print the version of binarycompletion
to prepare SHELL completionbash
shell completionzsh
shell completionhelp
to show help messageFlags:
--no-sort
omit sorted rendering of inputs and outputs--sort-inputs-by-required
sort inputs by name and prints required inputs first--with-aggregate-type-defaults
print default values of aggregate types--version
to print the version of binary-h, --help
to show help message for binary and each subcommandsmarkdown
and its children commands:--no-required
omit "Required" column when generating MarkdownThe migration was 99% backward compatible and without any functionality change except the default execution of binary shows help message and
pretty
print has been moved to its own standalone commands (Any comments or suggestion on this will be greatly appreciated)Issues Resolved
List any existing issues this pull request resolves.
Checklist
Put an
x
into all boxes that apply:Tests
make test
.Documentation
Code Style