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
- type Updater
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NameRe = "[\\w.][\\w.-]*" OwnerRe = "[a-zA-Z0-9][a-zA-Z0-9-]*" NameWithOwnerRe = fmt.Sprintf("^(?:%s|%s\\/%s)$", NameRe, OwnerRe, NameRe) CmdRunner = NewRunner() )
View Source
var EnableAutoUpdate = false
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 ¶
- alias.go
- apply.go
- args.go
- browse.go
- checkout.go
- cherry_pick.go
- ci_status.go
- clone.go
- commands.go
- compare.go
- create.go
- fetch.go
- fork.go
- help.go
- init.go
- issue.go
- merge.go
- pull_request.go
- pull_request_tpl.go
- push.go
- release.go
- release_tpl.go
- remote.go
- runner.go
- selfupdate.go
- submodule.go
- sync.go
- updater.go
- utils.go
- version.go
Click to show internal directories.
Click to hide internal directories.