Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor interface { // Exec executes program with args, and returns stdout if the return code is zero. // If nonzero, stderr is included in error. Exec(program string, args ...string) (string, error) // ExecLines is similar to Exec, except it splits the output on newlines. All empty // lines are discarded. ExecLines(program string, args ...string) ([]string, error) }
Executor is a shim over cmd.Output() that allows for testing.
func NewShellExecutor ¶
func NewShellExecutor() Executor
NewShellExecutor creates a shell.Executor that is implemented by exec.Command.
Click to show internal directories.
Click to hide internal directories.