Versions in this module Expand all Collapse all v1 v1.0.0 Oct 6, 2025 Changes in this version + var ArbitraryArgs = func(cmd *Command, args []string) error + var ExactArgs = func(n int) PositionalArgs + var MaximumNArgs = func(n int) PositionalArgs + var MinimumNArgs = func(n int) PositionalArgs + var NoArgs = func(cmd *Command, args []string) error + var RangeArgs = func(min, max int) PositionalArgs + type Command struct + Aliases []string + Args PositionalArgs + DisableAutoGenTag bool + DisableFlagParsing bool + EnableColors *bool + EnableInteractive bool + Example string + Hidden bool + Long string + PersistentPostRun func(cmd *Command, args []string) + PersistentPostRunE func(cmd *Command, args []string) error + PersistentPreRun func(cmd *Command, args []string) + PersistentPreRunE func(cmd *Command, args []string) error + PostRun func(cmd *Command, args []string) + PostRunE func(cmd *Command, args []string) error + PreRun func(cmd *Command, args []string) + PreRunE func(cmd *Command, args []string) error + Run func(cmd *Command, args []string) + RunE func(cmd *Command, args []string) error + Short string + ShowSpinner bool + SilenceErrors bool + SilenceUsage bool + Use string + ValidArgs []string + ValidArgsFunction func(cmd *Command, args []string, toComplete string) ([]string, error) + Version string + func (c *Command) AddCommand(cmds ...*Command) + func (c *Command) Commands() []*Command + func (c *Command) Context() interface{} + func (c *Command) ErrOrStderr() io.Writer + func (c *Command) Execute() error + func (c *Command) ExecuteContext(ctx interface{}) error + func (c *Command) Find(args []string) (*Command, []string, error) + func (c *Command) Flags() *pflag.FlagSet + func (c *Command) HasAlias(s string) bool + func (c *Command) HasParent() bool + func (c *Command) HasSubCommands() bool + func (c *Command) Help() error + func (c *Command) InOrStdin() io.Reader + func (c *Command) LocalFlags() *pflag.FlagSet + func (c *Command) ModernHelp() string + func (c *Command) Name() string + func (c *Command) OutOrStdout() io.Writer + func (c *Command) Parent() *Command + func (c *Command) ParseFlags(args []string) error + func (c *Command) PersistentFlags() *pflag.FlagSet + func (c *Command) PrintBox(title, content string) + func (c *Command) PrintBullet(msg string) + func (c *Command) PrintCode(code string) + func (c *Command) PrintError(msg string) + func (c *Command) PrintHeader(msg string) + func (c *Command) PrintInfo(msg string) + func (c *Command) PrintSubHeader(msg string) + func (c *Command) PrintSuccess(msg string) + func (c *Command) PrintWarning(msg string) + func (c *Command) RemoveCommand(cmds ...*Command) + func (c *Command) Root() *Command + func (c *Command) SetContext(ctx interface{}) + func (c *Command) SetErr(err io.Writer) + func (c *Command) SetHelpCommand(cmd *Command) + func (c *Command) SetHelpFunc(f func(*Command, []string)) + func (c *Command) SetIn(in io.Reader) + func (c *Command) SetOutput(output io.Writer) + func (c *Command) SetUsageFunc(f func(*Command) error) + func (c *Command) SetUsageTemplate(s string) + func (c *Command) SetVersionTemplate(s string) + func (c *Command) Usage() error + func (c *Command) UsageString() string + func (c *Command) UseLine() string + type PositionalArgs func(cmd *Command, args []string) error