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) 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
- type ErrHelp
- 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 Flag *utils.ArgsParser // 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) Key string Usage string Long string KnownFlags string GitExtension bool // contains filtered or unexported fields }
func (*Command) UsageError ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.