shell

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockShell

type MockShell struct {
	LastNameCalled string
	LastArgsCalled []string
	OutputToReturn []string
	ErrorToReturn  error
}

func (*MockShell) AsyncStdout

func (sh *MockShell) AsyncStdout(asyncError chan error, name string, arg ...string) (*bufio.Reader, error)

func (*MockShell) CombinedOutput

func (sh *MockShell) CombinedOutput(name string, arg ...string) (string, error)

func (*MockShell) HomeDir

func (sh *MockShell) HomeDir() string

func (*MockShell) LastFullCommand

func (sh *MockShell) LastFullCommand() string

func (*MockShell) Path

func (sh *MockShell) Path() string

func (*MockShell) WaitForCharacter

func (sh *MockShell) WaitForCharacter(charToWaitFor byte, outputReader *bufio.Reader, timeout time.Duration) (string, error)

type Shell

type Shell interface {
	CombinedOutput(name string, arg ...string) (string, error)
	AsyncStdout(potentialErrorFromAsyncProcess chan error, name string, arg ...string) (*bufio.Reader, error)
	WaitForCharacter(charToWaitFor byte, output *bufio.Reader, timeout time.Duration) (string, error)
	HomeDir() string
	Path() string
}

func NewUnixShell

func NewUnixShell() Shell

Jump to

Keyboard shortcuts

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