Documentation ¶
Overview ¶
Package exec mocks running commands. The mocks are used for unit testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetBackend ¶
func SetBackend(backend ExecBackend)
Types ¶
type ExecBackend ¶
func Backend ¶
func Backend() ExecBackend
type MockCommand ¶
type MockCommand struct {
// contains filtered or unexported fields
}
func NewMockCommand ¶
func NewMockCommand(results ...*MockResult) *MockCommand
func (*MockCommand) Output ¶
func (c *MockCommand) Output() ([]byte, error)
type MockResult ¶
func NewMockResult ¶
func NewMockResult(stdout string, err error) *MockResult
Click to show internal directories.
Click to hide internal directories.