Documentation ¶
Index ¶
- Variables
- type Args
- func (a *Args) After(command ...string)
- 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) 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 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
View Source
var Version = "2.2.0-rc1"
Functions ¶
This section is empty.
Types ¶
type Args ¶
type Args struct { Executable string Command string Params []string Noop bool // 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 Short string Long string GitExtension bool // contains filtered or unexported fields }
func (*Command) FormattedUsage ¶
func (*Command) PrintUsage ¶
func (c *Command) PrintUsage()
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
- updater.go
- utils.go
- version.go
Click to show internal directories.
Click to hide internal directories.