Documentation ¶
Index ¶
- func GetConditionalCheck(conditionals ...string) func(line string) bool
- func HandleOutput(in io.ReadCloser, log log.Logger, permitted func(string) bool, ...)
- func Run(command string, log log.Logger, conditionals ...string) error
- func RunArgs(command string, args []string, dir string, log log.Logger, ...) error
- func RunDir(command string, dir string, log log.Logger, conditionals ...string) error
- func RunStack(stack []*RunCmd, log log.Logger, conditionals ...string) (err error)
- type Pipe
- type RunCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConditionalCheck ¶
GetConditionalCheck return a function that can be used to check each line of output for content that indicates success.
func HandleOutput ¶
func HandleOutput(in io.ReadCloser, log log.Logger, permitted func(string) bool, permissible chan<- bool)
HandleOutput take the supplied output and print it to screen checking for matches in the output to indicate if the output indicates success.
func RunArgs ¶
func RunArgs(command string, args []string, dir string, log log.Logger, conditionals ...string) error
RunArgs run the command with supplied args (not safe for args that require whitespace).
Types ¶
type RunCmd ¶
type RunCmd struct {
// contains filtered or unexported fields
}
func CreateRunStack ¶
CreateRunStack create a run stack from the slice of command strings.
func CreateRunStackWithArgs ¶
CreateRunStackWithArgs create a run stack from the slice of Pipe structs, should automatically chain the stdout of the previous command into the stdin of the subsequent command.
Click to show internal directories.
Click to hide internal directories.