Versions in this module Expand all Collapse all v1 v1.14.2 Feb 25, 2025 Changes in this version + func Redact(redactions []string, runOutput string) string + type CaptureOutputMode int + const CaptureOutputModeCombined + const CaptureOutputModeStdout + type CmdRunner interface + Run func(runOptions *RunOptions, format string, vars ...interface{}) (RunResult, error) + RunWithPositionalAndNamedArguments func(runOptions *RunOptions, positionalArgs []string, namedArgs map[string]string) (RunResult, error) + Stream func(ctx context.Context, runOptions *RunOptions, format string, ...) (io.ReadCloser, error) + type MockRunner struct + func NewMockRunner() *MockRunner + func (m *MockRunner) Run(runOptions *RunOptions, format string, vars ...interface{}) (RunResult, error) + func (m *MockRunner) RunWithPositionalAndNamedArguments(runOptions *RunOptions, positionalArgs []string, namedArgs map[string]string) (RunResult, error) + func (m *MockRunner) Stream(ctx context.Context, runOptions *RunOptions, format string, ...) (io.ReadCloser, error) + type RunOptions struct + CaptureOutputMode CaptureOutputMode + Env map[string]string + LogOnlyOnFailure bool + LogRedactions []string + SkipLogOnFailure bool + Stdin *string + WorkingDir *string + type RunResult struct + ExitCode int + Output string + Stderr string + type ShellRunner struct + func NewShellRunner(parentLogger logger.Logger) (*ShellRunner, error) + func (sr *ShellRunner) Run(runOptions *RunOptions, format string, vars ...interface{}) (RunResult, error) + func (sr *ShellRunner) RunWithPositionalAndNamedArguments(runOptions *RunOptions, positionalArgs []string, namedArgs map[string]string) (RunResult, error) + func (sr *ShellRunner) SetShell(shell string) + func (sr *ShellRunner) Stream(ctx context.Context, runOptions *RunOptions, format string, ...) (io.ReadCloser, error)