Documentation ¶
Overview ¶
Package exec runs external commands. It's a wrapper around Go's os/exec package that allows to stub command execution for testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultRunner ¶
DefaultRunner is the default function used to run commands. It calls os/exec.Run so that stdout and stderr are written to the terminal. DefaultRunner also logs all executed commands.
func RunCommand ¶
RunCommand runs the specified command using the currently registered RunnerFunc.
func SetRunnerFunc ¶
func SetRunnerFunc(f RunnerFunc)
SetRunnerFunc registers the function f to run all future commands.
Types ¶
type RunnerFunc ¶
The RunnerFunc type is an adapter to use any function for running commands.
Click to show internal directories.
Click to hide internal directories.