Documentation
¶
Index ¶
- func Cmd(command string, args []string) *exec.Cmd
- func Mock(f CommandFunc)
- func MockExec(t *testing.T, stdout io.Writer, stderr io.Writer) func()
- func MockExecCommand(stdout io.Writer, stderr io.Writer) func(command string, args []string) *exec.Cmd
- func Restore()
- type ApplyOptionFunc
- type Command
- type CommandFunc
- type CommandOption
- type UiErrorWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Mock ¶
func Mock(f CommandFunc)
Enables mocking of the underlying ExecCommand command (defaults to exec.Command) and no-ops the OptionApplier function so they have no effect.
func MockExecCommand ¶
Types ¶
type ApplyOptionFunc ¶
type ApplyOptionFunc func(option CommandOption, cmd *exec.Cmd)
var OptionApplier ApplyOptionFunc = applyOption
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
func WithOptions ¶
func WithOptions(options ...CommandOption) *Command
type CommandFunc ¶
var ExecCommand CommandFunc = execCommand
type CommandOption ¶
func WithLogging ¶
func WithLogging(ui cli.Ui) CommandOption
func WithTermOutput ¶
func WithTermOutput() CommandOption
func WithUiOutput ¶
func WithUiOutput(ui cli.Ui) CommandOption
type UiErrorWriter ¶
Click to show internal directories.
Click to hide internal directories.