Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
Name string // Command name (e.g., "git")
Args []string // Command arguments
WorkDir string // Optional working directory
}
Command represents a shell command to be executed
func GitBranchDelete ¶
GitBranchDelete builds a git branch delete command
func GitWorktreeAdd ¶
func GitWorktreeAdd(path, commitish string, opts GitWorktreeAddOptions) Command
GitWorktreeAdd builds a git worktree add command
func GitWorktreeList ¶
func GitWorktreeList() Command
GitWorktreeList builds a git worktree list command
func GitWorktreeRemove ¶
GitWorktreeRemove builds a git worktree remove command
type ExecutionResult ¶
type ExecutionResult struct {
Results []Result
}
ExecutionResult represents the result of executing multiple commands
type Executor ¶
type Executor interface {
Execute(commands []Command) (*ExecutionResult, error)
}
Executor interface defines how commands are executed
func NewExecutor ¶
func NewExecutor(shell ShellExecutor) Executor
NewExecutor creates a new command executor with the given shell executor
func NewRealExecutor ¶
func NewRealExecutor() Executor
NewRealExecutor creates a new command executor with real shell execution
type GitWorktreeAddOptions ¶
GitWorktreeAddOptions represents options for git worktree add command
type ShellExecutor ¶
type ShellExecutor interface {
Execute(name string, args []string, workDir string) (string, error)
}
ShellExecutor interface abstracts the actual command execution
func NewRealShellExecutor ¶
func NewRealShellExecutor() ShellExecutor
NewRealShellExecutor creates a new shell executor that executes real commands