Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CmdRunner ¶
type CmdRunner interface {
Run() error
Start() error
Wait() error
Output() ([]byte, error)
CombinedOutput() ([]byte, error)
StdinPipe() (io.WriteCloser, error)
StdoutPipe() (io.ReadCloser, error)
StderrPipe() (io.ReadCloser, error)
SetEnv(env []string)
SetStdin(stdin io.Reader)
}
CmdRunner is an interface that exec.Cmd-like commands must implement
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor wraps subprocess execution with automatic output logging via slog
func New ¶
New creates a new Executor that logs subprocess output via slog The logger should be configured to handle subprocess output appropriately
func (*Executor) Command ¶
Command creates a new command for use with Output() Only stderr is logged/displayed, stdout is captured by Output()
func (*Executor) CommandWithOutput ¶
CommandWithOutput creates a command that displays and logs subprocess output Use this for commands that call Run() (not Output()) Output is displayed in real-time with indentation, then logged as a single entry when complete
Click to show internal directories.
Click to hide internal directories.