Package console provides a feature to implement CLI commands into your aah application easily and extensible.
AppHelpTemplate method sets the custom text/template for application help. Console uses text/template to render templates.
CommandHelpTemplate method sets the custom text/template for command help. Console uses text/template to render templates.
HelpFlagDesc method customized flag name, desc for HelpFlag.
ShowAppHelp is an action that displays the help.
ShowAppHelpAndExit - Prints the list of subcommands for the app and exits with exit code.
ShowCommandHelp prints help for the given command
ShowCommandHelpAndExit - exits with code after showing help
ShowSubcommandHelp prints help for the given subcommand.
ShowVersion prints the version number of the App.
SubcommandHelpTemplate method sets the custom text/template for sub-command help. Console uses text/template to render templates.
VersionFlagDesc method customized flag name, desc for VersionFlag.
VersionPrinter method set custom func for version printer.
Application is the main structure of a console application. It is recommended that an app be created with the func `console.NewApp()`.
NewApp creates a new console Application with some reasonable defaults for Name, Usage, Version and Action.
Args contains apps console arguments
Author represents someone who has contributed to a console project.
BoolFlag is a flag with type bool
Command returns the named command on App. Returns nil if the command does not exist
CommandsByName is a sorter interface for commands.
Context is a type that is passed through to each Handler action in a console application. Context can be used to retrieve context-specific Args and parsed command-line options.
NewContext creates a new context. For use in when invoking an App or Command action.
Flag is a common interface related to parsing flags in console. For more advanced flag parsing techniques, it is recommended that this interface be implemented.
FlagsByName is a sorter interface for flags.
Float64Flag is a flag with type float64
Int64Flag is a flag with type int64
IntFlag is a flag with type int
IntSlice is an opaque type for int to satisfy flag.Value and flag.
StringFlag is a flag with type string
StringSlice is an opaque type for string to satisfy flag.Value and flag.