Versions in this module Expand all Collapse all v0 v0.5.1 Feb 19, 2025 v0.5.0 Feb 17, 2025 Changes in this version + var HelpFuncs = template.FuncMap + var HelpTemplate = ... + func Execute(ctx context.Context, root *Command, args []string) error + type Command struct + Aliases []string + Annotations map[string]interface{} + Args PositionalArgs + Example string + Hidden bool + Long string + Run func(ctx *Context, args []string) + Short string + Usage string + Version string + func Export(fn interface{}, use string) *Command + func (c *Command) AddCommand(sub *Command) + func (c *Command) CommandPath() string + func (c *Command) Find(args []string) (cmd *Command, n int) + func (c *Command) Flags() *FlagSet + func (c *Command) Name() string + func (c *Command) UseLine() string + type CommandHelp struct + func (c *CommandHelp) Available() bool + func (c *CommandHelp) Commands() (cmds []*CommandHelp) + func (c *CommandHelp) FlagUsages() string + func (c *CommandHelp) HasExample() bool + func (c *CommandHelp) HasFlags() bool + func (c *CommandHelp) HasSubCommands() bool + func (c *CommandHelp) NameAndAliases() string + func (c *CommandHelp) NamePadding() int + func (c *CommandHelp) Runnable() bool + func (c *CommandHelp) WriteHelp(w io.Writer) error + type Context struct + func ContextWithIO(parent context.Context, in io.Reader, out io.Writer, err io.Writer) *Context + func (c Context) Errout() io.Writer + func (c Context) Read(p []byte) (n int, err error) + func (c Context) Write(p []byte) (n int, err error) + type FlagSet struct + func (f *FlagSet) Int32(name string, value int32, usage string) *int32 + func (f *FlagSet) Int32Var(p *int32, name string, value int32, usage string) + type Framework struct + DefaultRunner Runner + Initializers []Initializer + Preprocessors []Preprocessor + Root *Command + func (f *Framework) Initialize() + func (f *Framework) Run(ctx context.Context) error + type Initializer interface + InitializeCLI func(root *Command) + type PositionalArgs func(cmd *Command, args []string) error + func ExactArgs(n int) PositionalArgs + func MaxArgs(n int) PositionalArgs + func MinArgs(n int) PositionalArgs + func RangeArgs(min int, max int) PositionalArgs + type Preprocessor interface + PreprocessCLI func(args []string) []string + type Runner interface + Run func(ctx context.Context) error