Documentation ¶
Index ¶
- Variables
- type Args
- func (a *Args) After(command ...string)
- func (a *Args) AfterFn(fn func() error)
- func (a *Args) AppendParams(params ...string)
- func (a *Args) Before(command ...string)
- func (a *Args) Commands() []*cmd.Cmd
- func (a *Args) FirstParam() string
- func (a *Args) GetParam(i int) string
- func (a *Args) HasFlags(flags ...string) bool
- func (a *Args) HasSubcommand() bool
- func (a *Args) IndexOfParam(param string) int
- func (a *Args) InsertParam(i int, items ...string)
- func (a *Args) IsParamsEmpty() bool
- func (a *Args) LastParam() string
- func (a *Args) NoForward()
- func (a *Args) ParamsSize() int
- func (a *Args) PrependParams(params ...string)
- func (a *Args) RemoveParam(i int) string
- func (a *Args) Replace(executable, command string, params ...string)
- func (a *Args) ReplaceParam(i int, item string)
- func (a *Args) ToCmd() *cmd.Cmd
- func (a *Args) Words() []string
- type Command
- func (c *Command) Arg(idx int) string
- func (c *Command) Call(args *Args) (err error)
- func (c *Command) FlagPassed(name string) bool
- func (c *Command) HelpText() string
- func (c *Command) Name() string
- func (c *Command) Runnable() bool
- func (c *Command) Synopsis() string
- func (c *Command) Use(subCommand *Command)
- type ExecError
- type Runner
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Args ¶
type Args struct { Executable string GlobalFlags []string Command string ProgramPath string Params []string Noop bool Terminator bool Callbacks []func() error // contains filtered or unexported fields }
func (*Args) AppendParams ¶
func (*Args) FirstParam ¶
func (*Args) HasSubcommand ¶
func (*Args) IndexOfParam ¶
func (*Args) InsertParam ¶
func (*Args) IsParamsEmpty ¶
func (*Args) ParamsSize ¶
func (*Args) PrependParams ¶
func (*Args) RemoveParam ¶
func (*Args) ReplaceParam ¶
type Command ¶
type Command struct { Run func(cmd *Command, args *Args) Flag flag.FlagSet Key string Usage string Long string GitExtension bool // contains filtered or unexported fields }
func (*Command) FlagPassed ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.