run

package
v0.0.0-...-8ac10f7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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 NewRun

func NewRun() *Run

NewRun generates a Run object

func (*Run) Command

func (run *Run) Command(cmdLine string, successRegex string, failureRegex string) error

Command executes a command that monitors output for success or failure

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

func (run *Run) CommandOutput(cmdLine string) (string, error)

CommandOutput executes a command that returns the output

func (*Run) ExecExistsInPath

func (run *Run) ExecExistsInPath(exe string) bool

ExecExistsInPath returns ture if exec exists in the given path

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL