Documentation ¶
Index ¶
- Variables
- type Run
- func (run *Run) Command(cmdLine string, successRegex string, failureRegex string) error
- func (run *Run) CommandEx(cmdLine string, successRegex string, failureRegex string, waitInSec int) error
- func (run *Run) CommandOutput(cmdLine string) (string, error)
- func (run *Run) ExecExistsInPath(exe string) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrBufferCreateFailed creating the buffer failed ErrBufferCreateFailed = errors.New("Unable to create the buffer object") //ErrScannerCreateFailed creating the scanner failed ErrScannerCreateFailed = errors.New("Unable to create the scanner object") //ErrReaderCreateFailed creating the reader failed ErrReaderCreateFailed = errors.New("Unable to create the reader object") //ErrCommandCreateFailed creating the command failed ErrCommandCreateFailed = errors.New("Unable to create the command object") //ErrExecuteFailed installation package failed ErrExecuteFailed = errors.New("The command line failed to execute correctly") )
Functions ¶
This section is empty.
Types ¶
type Run ¶
type Run struct{}
Run is a static class that enables running and capturing command output
func (*Run) CommandEx ¶
func (run *Run) CommandEx(cmdLine string, successRegex string, failureRegex string, waitInSec int) error
CommandEx executes a command that monitors output for success or failure with a timeout
func (*Run) CommandOutput ¶
CommandOutput executes a command that returns the output
func (*Run) ExecExistsInPath ¶
ExecExistsInPath returns ture if exec exists in the given path
Click to show internal directories.
Click to hide internal directories.