Add UsageOnMissing option to Kong
Adds an UsageOnMissing option which configures Kong to omit errors and display usage when a command is invalid due to a missing argument. This can be useful if a user wishes for the top-level command to print usage when no args are supplied, or if they would prefer child commands which have their own subcommands to print usage specific to that command. Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
This commit is contained in:
@@ -47,13 +47,14 @@ type Kong struct {
|
||||
resolvers []Resolver
|
||||
registry *Registry
|
||||
|
||||
noDefaultHelp bool
|
||||
usageOnError bool
|
||||
help HelpPrinter
|
||||
helpFormatter HelpValueFormatter
|
||||
helpOptions HelpOptions
|
||||
helpFlag *Flag
|
||||
vars Vars
|
||||
noDefaultHelp bool
|
||||
usageOnError bool
|
||||
usageOnMissing bool
|
||||
help HelpPrinter
|
||||
helpFormatter HelpValueFormatter
|
||||
helpOptions HelpOptions
|
||||
helpFlag *Flag
|
||||
vars Vars
|
||||
|
||||
// Set temporarily by Options. These are applied after build().
|
||||
postBuildOptions []Option
|
||||
|
||||
Reference in New Issue
Block a user