Documentation
¶
Overview ¶
Package exec provides command execution with mocking support for testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandExecutor ¶
type CommandExecutor interface {
// Execute runs a command with the given name and arguments.
// Returns stdout, stderr, and any error.
Execute(name string, args ...string) (stdout, stderr string, err error)
}
CommandExecutor defines an interface for executing external commands. This allows us to mock command execution in tests.
type RealExecutor ¶
type RealExecutor struct{}
RealExecutor executes actual system commands.
func NewRealExecutor ¶
func NewRealExecutor() *RealExecutor
NewRealExecutor creates an executor that runs real commands.
Click to show internal directories.
Click to hide internal directories.