Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

cobra

Cobra — CLI application framework for Go (spf13/cobra).

referencedescription
commandsCommand, AddCommand, subcommand, project structure
flagsPersistentFlags, LocalFlags, required, groups
argumentspositional args, Args, validators, ExactArgs
hooksPreRun, PostRun, PersistentPreRun, execution order
help-usagehelp/usage templates, version, command grouping
completionsshell completion, ValidArgsFunction, ShellCompDirective
viper-integrationconfig, OnInitialize, BindPFlag, 12-factor