Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor interface { // Execute executes the given command Execute(command string, args ...string) ([]byte, error) // LookPath searches for an executable named file in the directories named // by the PATH environment variable. LookPath(file string) (string, error) }
Executor is an interface for executing commands.
type LocalExecutor ¶
type LocalExecutor struct {
// contains filtered or unexported fields
}
LocalExecutor is an Executor that runs commands locally.
func NewLocalExecutor ¶
func NewLocalExecutor(logger *slog.Logger, options ...LocalExecutorOption) *LocalExecutor
NewLocalExecutor creates a new LocalExecutor with the given options.
type LocalExecutorOption ¶
type LocalExecutorOption func(e *LocalExecutor)
LocalExecutorOption is an option for configuring a LocalExecutor.
func WithRedirect ¶
func WithRedirect() LocalExecutorOption
WithRedirect is an option that configures the LocalExecutor to redirect the stdout and stderr of the commands to the stdout and stderr of the local process.
func WithRedirectTo ¶
func WithRedirectTo(stdout, stderr io.Writer) LocalExecutorOption
WithRedirectTo is an option that configures the LocalExecutor to redirect the stdout and stderr of the commands to the given writers.
type WrappedExecuter ¶ added in v0.3.0
WrappedExecuter is an interface for executing commands using a specific command.
type WrappedLocalExecutor ¶ added in v0.3.0
type WrappedLocalExecutor struct { Executor // contains filtered or unexported fields }
func NewLocalWrappedExecutor ¶ added in v0.3.0
func NewLocalWrappedExecutor(e Executor, command string) WrappedLocalExecutor
Click to show internal directories.
Click to hide internal directories.