Help us shape the future of Go! Take the 2026 Go Developer Survey

runner

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunDiff

func RunDiff(
	ctx context.Context,
	cfg *config.Config,
	outMode string,
	a parse.DiffArgs,
	finder repo.Finder,
	r iterRunner.Runner,
	stdout, stderr io.Writer,
) error

RunDiff executes the "diff" subcommand logic. finder is expected to already be filtered by DiffArgs.Patterns and dirty/clean filter. r is the runner used to execute git diff in each repository.

func RunDo

func RunDo(
	ctx context.Context,
	cfg *config.Config,
	outMode string,
	a parse.DoArgs,
	finder repo.Finder,
	r iterRunner.Runner,
	stdout, stderr io.Writer,
) error

RunDo executes the "do" subcommand logic. finder is expected to already be filtered by DoArgs.Patterns. r is the runner used to execute the command in each repository.

func RunFetch

func RunFetch(
	ctx context.Context,
	cfg *config.Config,
	outMode string,
	a parse.FetchArgs,
	finder repo.Finder,
	r iterRunner.Runner,
	stdout, stderr io.Writer,
) error

RunFetch executes the "fetch" subcommand logic. finder is expected to already be filtered by FetchArgs.Patterns. r is the runner used to execute git fetch in each repository.

func RunGet added in v0.3.0

func RunGet(
	ctx context.Context,
	cfg *config.Config,
	outMode string,
	a parse.GetArgs,
	finder repo.Finder,
	r iterRunner.Runner,
	stdout, stderr io.Writer,
) error

RunGet executes the "get" subcommand logic. If a.URI is empty, it lists discovered repositories via finder. If a.URI is non-empty, it checks whether the corresponding local repository exists under cfg.ReposRoot; if not, it clones a.URI into that directory using r (routing clone output to stderr) and writes the repository path to stdout.

func RunGrep

func RunGrep(
	ctx context.Context,
	cfg *config.Config,
	outMode string,
	a parse.GrepArgs,
	finder repo.Finder,
	innerRunner iterRunner.Runner,
	stdout, stderr io.Writer,
) error

RunGrep executes the "grep" subcommand logic. finder is expected to already be filtered by GrepArgs.Patterns. innerRunner is the base runner wrapped by GrepRunner for each repository.

func RunList

func RunList(
	ctx context.Context,
	cfg *config.Config,
	outMode string,
	_ parse.ListArgs,
	finder repo.Finder,
	stdout io.Writer,
) error

RunList executes the "list" subcommand logic. finder is expected to already be filtered by ListArgs.Patterns.

func RunLsFiles

func RunLsFiles(
	ctx context.Context,
	cfg *config.Config,
	outMode string,
	a parse.LsFilesArgs,
	finder repo.Finder,
	innerRunner iterRunner.Runner,
	showAbsPath bool,
	stdout, stderr io.Writer,
) error

RunLsFiles executes the "ls-files" subcommand logic. finder is expected to already be filtered by LsFilesArgs.Patterns. showAbsPath overrides cfg.AbsPath if true. innerRunner executes git commands.

func RunPull

func RunPull(
	ctx context.Context,
	cfg *config.Config,
	outMode string,
	a parse.PullArgs,
	finder repo.Finder,
	r iterRunner.Runner,
	stdout, stderr io.Writer,
) error

RunPull executes the "pull" subcommand logic. finder is expected to already be filtered by PullArgs.Patterns. r is the runner used to execute git pull in each repository.

func RunRead

func RunRead(
	ctx context.Context,
	cfg *config.Config,
	outMode string,
	a parse.ReadArgs,
	finder repo.Finder,
	r iterRunner.Runner,
	stdout, stderr io.Writer,
) error

RunRead executes the "read" subcommand logic. finder supplies the repository paths (typically a StdinFinder in production). r is the runner used to execute the command in each repository.

func RunStatus

func RunStatus(
	ctx context.Context,
	cfg *config.Config,
	outMode string,
	a parse.StatusArgs,
	finder repo.Finder,
	r iterRunner.Runner,
	stdout, stderr io.Writer,
) error

RunStatus executes the "status" subcommand logic. finder is expected to already be filtered by StatusArgs.Patterns and dirty/clean filter. r is the runner used to execute git status in each repository.

func RunWorktreeAdd added in v0.4.0

func RunWorktreeAdd(
	ctx context.Context,
	cfg *config.Config,
	outMode string,
	a parse.WorktreeAddArgs,
	repoDir string,
	r iterRunner.Runner,
	stdout, stderr io.Writer,
) error

RunWorktreeAdd executes the "worktree add" subcommand logic for the repository at repoDir.

func RunWorktreeList added in v0.4.0

func RunWorktreeList(
	ctx context.Context,
	cfg *config.Config,
	outMode string,
	a parse.WorktreeListArgs,
	wtFinder repo.Finder,
	stdout io.Writer,
) error

RunWorktreeList executes the "worktree list" subcommand logic.

func RunWorktreePrune added in v0.4.0

func RunWorktreePrune(
	ctx context.Context,
	cfg *config.Config,
	outMode string,
	a parse.WorktreePruneArgs,
	repoDir string,
	wtFinder repo.Finder,
	r iterRunner.Runner,
	stdout, stderr io.Writer,
) error

RunWorktreePrune executes the "worktree prune" subcommand logic.

func RunWorktreeRemove added in v0.4.0

func RunWorktreeRemove(
	ctx context.Context,
	cfg *config.Config,
	a parse.WorktreeRemoveArgs,
	repoDir string,
	r iterRunner.Runner,
	stderr io.Writer,
) error

RunWorktreeRemove executes the "worktree remove" subcommand logic for the repository at repoDir.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL