Documentation ¶
Index ¶
- Variables
- type CommandListener
- type CommandResult
- type CommandRunner
- func (r *CommandRunner) Arg(arg string) *CommandRunner
- func (r *CommandRunner) Args(arg []string) *CommandRunner
- func (r *CommandRunner) EnsureExitcode(arg ...int) *CommandRunner
- func (r *CommandRunner) Env(key, value string) *CommandRunner
- func (r *CommandRunner) Envs(env []string) *CommandRunner
- func (r *CommandRunner) FailOnExitCode() *CommandRunner
- func (r *CommandRunner) FailOnStderr() *CommandRunner
- func (r *CommandRunner) FailOnTimeout() *CommandRunner
- func (r *CommandRunner) Listen(lstr CommandListener) *CommandRunner
- func (r *CommandRunner) ListenStderr(lstr func(string)) *CommandRunner
- func (r *CommandRunner) ListenStdout(lstr func(string)) *CommandRunner
- func (r *CommandRunner) RawEnv(env string) *CommandRunner
- func (r *CommandRunner) Run() (CommandResult, error)
- func (r *CommandRunner) Timeout(timeout time.Duration) *CommandRunner
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExitCode = errors.New("process exited with an unexpected exitcode")
View Source
var ErrStderrPrint = errors.New("process did print to stderr stream")
View Source
var ErrTimeout = errors.New("process did not exit after the specified timeout")
Functions ¶
This section is empty.
Types ¶
type CommandListener ¶ added in v0.0.72
type CommandResult ¶
type CommandResult struct { StdOut string StdErr string StdCombined string ExitCode int CommandTimedOut bool }
func RunCommand ¶
type CommandRunner ¶ added in v0.0.68
type CommandRunner struct {
// contains filtered or unexported fields
}
func Runner ¶ added in v0.0.68
func Runner(program string) *CommandRunner
func (*CommandRunner) Arg ¶ added in v0.0.68
func (r *CommandRunner) Arg(arg string) *CommandRunner
func (*CommandRunner) Args ¶ added in v0.0.68
func (r *CommandRunner) Args(arg []string) *CommandRunner
func (*CommandRunner) EnsureExitcode ¶ added in v0.0.84
func (r *CommandRunner) EnsureExitcode(arg ...int) *CommandRunner
func (*CommandRunner) Env ¶ added in v0.0.68
func (r *CommandRunner) Env(key, value string) *CommandRunner
func (*CommandRunner) Envs ¶ added in v0.0.68
func (r *CommandRunner) Envs(env []string) *CommandRunner
func (*CommandRunner) FailOnExitCode ¶ added in v0.0.84
func (r *CommandRunner) FailOnExitCode() *CommandRunner
func (*CommandRunner) FailOnStderr ¶ added in v0.0.236
func (r *CommandRunner) FailOnStderr() *CommandRunner
func (*CommandRunner) FailOnTimeout ¶ added in v0.0.84
func (r *CommandRunner) FailOnTimeout() *CommandRunner
func (*CommandRunner) Listen ¶ added in v0.0.72
func (r *CommandRunner) Listen(lstr CommandListener) *CommandRunner
func (*CommandRunner) ListenStderr ¶ added in v0.0.72
func (r *CommandRunner) ListenStderr(lstr func(string)) *CommandRunner
func (*CommandRunner) ListenStdout ¶ added in v0.0.72
func (r *CommandRunner) ListenStdout(lstr func(string)) *CommandRunner
func (*CommandRunner) RawEnv ¶ added in v0.0.68
func (r *CommandRunner) RawEnv(env string) *CommandRunner
func (*CommandRunner) Run ¶ added in v0.0.68
func (r *CommandRunner) Run() (CommandResult, error)
func (*CommandRunner) Timeout ¶ added in v0.0.68
func (r *CommandRunner) Timeout(timeout time.Duration) *CommandRunner
Click to show internal directories.
Click to hide internal directories.