Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SplitWithDash ¶
SplitWithDash splits args into patterns (before dash) and command/flags (after dash). If dashIndex >= 0 (provided by Cobra ArgsLenAtDash), it splits at that index. Otherwise, it falls back to looking for a literal "--" element in args.
Types ¶
type DiffArgs ¶
type DiffArgs struct {
Patterns []string // repository filter regexps; empty means all
DiffFlags []string // optional arguments forwarded to "git diff"
Interactive bool // whether to run git diff interactively (with pager)
}
DiffArgs is the parsed argument set for the "diff" subcommand.
func ParseDiffArgs ¶
ParseDiffArgs parses raw cobra args into DiffArgs.
func ParseDiffArgsWithDash ¶
ParseDiffArgsWithDash parses args taking into account Cobra's ArgsLenAtDash().
type DoArgs ¶
type DoArgs struct {
Patterns []string // repository filter regexps
Command []string // command to run in each matching repo
}
DoArgs is the parsed argument set for the "do" subcommand.
func ParseDoArgs ¶
ParseDoArgs parses raw cobra args into DoArgs. Returns an error when no COMMAND is provided after "--".
type FetchArgs ¶
type FetchArgs struct {
Patterns []string // repository filter regexps; empty means all
FetchFlags []string // optional arguments forwarded to "git fetch"
}
FetchArgs is the parsed argument set for the "fetch" subcommand.
func ParseFetchArgs ¶
ParseFetchArgs parses raw cobra args into FetchArgs.
func ParseFetchArgsWithDash ¶
ParseFetchArgsWithDash parses args taking into account Cobra's ArgsLenAtDash().
type GetArgs ¶ added in v0.3.0
type GetArgs struct {
URI string // repository URI to clone/resolve; empty means list all repositories
}
GetArgs is the parsed argument set for the "get" subcommand.
func ParseGetArgs ¶ added in v0.3.0
ParseGetArgs parses raw cobra args into GetArgs.
type GrepArgs ¶
type GrepArgs struct {
Patterns []string // repository filter regexps
GitGrepArgs []string // arguments forwarded verbatim to "git grep"
}
GrepArgs is the parsed argument set for the "grep" subcommand.
func ParseGrepArgs ¶
ParseGrepArgs parses raw cobra args into GrepArgs. Returns an error when no GIT_GREP_ARGS are provided after "--".
type ListArgs ¶
type ListArgs struct {
Patterns []string // repository filter regexps; empty means all
}
ListArgs is the parsed argument set for the "list" subcommand.
func ParseListArgs ¶
ParseListArgs parses raw cobra args into ListArgs. Never errors.
type LsFilesArgs ¶
type LsFilesArgs struct {
Patterns []string // repository filter regexps; empty means all
LsFilesFlags []string // optional arguments forwarded to "git ls-files"
}
LsFilesArgs is the parsed argument set for the "ls-files" subcommand.
func ParseLsFilesArgs ¶
func ParseLsFilesArgs(args []string) LsFilesArgs
ParseLsFilesArgs parses raw cobra args into LsFilesArgs.
func ParseLsFilesArgsWithDash ¶
func ParseLsFilesArgsWithDash(args []string, dashIndex int) LsFilesArgs
ParseLsFilesArgsWithDash parses args taking into account Cobra's ArgsLenAtDash().
type PullArgs ¶
type PullArgs struct {
Patterns []string // repository filter regexps; empty means all
PullFlags []string // optional arguments forwarded to "git pull"
}
PullArgs is the parsed argument set for the "pull" subcommand.
func ParsePullArgs ¶
ParsePullArgs parses raw cobra args into PullArgs.
func ParsePullArgsWithDash ¶
ParsePullArgsWithDash parses args taking into account Cobra's ArgsLenAtDash().
type ReadArgs ¶
type ReadArgs struct {
Command []string // command to run in each repo read from stdin
}
ReadArgs is the parsed argument set for the "read" subcommand.
func ParseReadArgs ¶
ParseReadArgs parses raw cobra args into ReadArgs. Never errors; cobra MinimumNArgs(1) ensures args is non-empty before RunE is called.
type StatusArgs ¶
type StatusArgs struct {
Patterns []string // repository filter regexps; empty means all
StatusFlags []string // optional arguments forwarded to "git status"
}
StatusArgs is the parsed argument set for the "status" subcommand.
func ParseStatusArgs ¶
func ParseStatusArgs(args []string) StatusArgs
ParseStatusArgs parses raw cobra args into StatusArgs.
func ParseStatusArgsWithDash ¶
func ParseStatusArgsWithDash(args []string, dashIndex int) StatusArgs
ParseStatusArgsWithDash parses args taking into account Cobra's ArgsLenAtDash().