Documentation ¶
Overview ¶
Package provides wrapper around os.exec for purpose of testing
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cmd ¶
type Cmd interface { StdinPipe() (io.WriteCloser, error) CombinedOutput() ([]byte, error) Start() error Wait() error }
Cmd is a facade to exec.Cmd.
type DefaultExecutor ¶
type DefaultExecutor struct{}
DefaultExecutor is a default implementation of Executable that passes back to standard library.
type Executable ¶
type Executable interface { Exec(cmd string, args []string) ([]byte, error) Cmd(cmd string, args []string) Cmd }
Executable is a facade to exec.Command().Output().
type FakeCmd ¶
type FakeCmd struct{}
FakeCmd implement Cmd interface for testing purposes.
func (FakeCmd) CombinedOutput ¶
type FakeExecutor ¶
FakeExecutor implements Executable stores faked Output, Error and commands recorded by Exec.
Click to show internal directories.
Click to hide internal directories.