Documentation
¶
Index ¶
- Variables
- func DefaultCommandCombinedOutput(dir string, name string, args ...string) ([]byte, error)
- func DefaultCommandOutput(dir string, name string, args ...string) ([]byte, error)
- func DefaultLookPath(file string) (string, error)
- func DefaultPipelineOutput(dir string, commands ...[]string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // LookPath is a function that performs `exec.LookPath`. // The sole purpose of this variable is to be able to mock calls to the exec module during tests. // // LookPath searches for an executable named file in the directories named by the PATH environment variable. // If file contains a slash, it is tried directly and the PATH is not consulted. // The result may be an absolute path or a path relative to the current directory. // (from exec.LookPath docstring) LookPath = DefaultLookPath // CommandOutput is a function that performs `exec.Command` in a certain dir, returning the command's Output(). // The sole purpose of this variable is to be able to mock calls to the exec module during tests. CommandOutput = DefaultCommandOutput // CommandCombinedOutput is a function that performs `exec.Command` in a certain dir, returning the command's CombinedOutput(). // The sole purpose of this variable is to be able to mock calls to the exec module during tests. CommandCombinedOutput = DefaultCommandCombinedOutput // PipelineOutput is a function that allows executing a pipeline of commands, // i.e. commands like `ls -l | grep exec | wc -l` PipelineOutput = DefaultPipelineOutput )
Functions ¶
func DefaultCommandCombinedOutput ¶
DefaultCommandOutput simply calls os/exec.Command, sets the directory and returns the command's Output().
func DefaultCommandOutput ¶
DefaultCommandOutput simply calls os/exec.Command, sets the directory and returns the command's Output().
func DefaultLookPath ¶
DefaultLookPath simply calls os/exec.LookPath
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.