Versions in this module Expand all Collapse all v0 v0.0.1 Jun 3, 2021 Changes in this version + const ShellCompDirectiveNoFileComp + func Apply(c *Command, cmdOpts ...Option) + func CheckErr(msg interface{}) + func CheckExit(err error, printStack ...bool) + func SetDebug(debug bool) + type AnyFlag pflag.FlagSet + func StructFlag(fs *pflag.FlagSet) *AnyFlag + func (af *AnyFlag) VarP(name, shorthand string, value interface{}, usage string) + type Command struct + func New(cmdOpts ...Option) *Command + func (c *Command) AddCommand(commands ...*Command) + func (c *Command) AddTo(parent *Command) *Command + func (c *Command) Execute(ctx context.Context) + type FlagSet = pflag.FlagSet + type Option interface + Apply func(c *Command) + func Alias(alias ...string) Option + func ArgAliases(alias ...string) Option + func Args(args PositionalArgs) Option + func Comment(short string, long ...string) Option + func DisableAutoGenTag(disabled ...bool) Option + func DisableFlagParsing(disabled ...bool) Option + func DisableFlagsInUseLine(disabled ...bool) Option + func DisableSuggestions(disabled ...bool) Option + func ExactArgs(n int) Option + func ExactValidArgs(n int) Option + func Flags(appFlag func(fs *FlagSet)) Option + func Group(opts ...Option) Option + func HelpCommand() Option + func Hidden(hidden ...bool) Option + func Long(long ...string) Option + func PersistentFlags(appFlag func(fs *FlagSet)) Option + func PersistentPostRun(run Runnable) Option + func PersistentPreRun(run Runnable) Option + func PostRun(run Runnable) Option + func PreRun(run Runnable) Option + func Run(run Runnable) Option + func StructFlags(appFlag func(fs *AnyFlag)) Option + func SubCommand(commands ...*Command) Option + func Use(use string, alias ...string) Option + func ValidArgs(validArgs ...string) Option + func ValidArgsFunction(...) Option + func Version(version string) Option + type OptionApply func(c *Command) + func (opt OptionApply) Apply(c *Command) + type PositionalArgs = cobra.PositionalArgs + type Runnable func(c *Command, args []string) + type ShellCompDirective = cobra.ShellCompDirective