exec

package
v0.0.0-...-2a0142f Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package exec is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	Output(args []string) (output string, err error)
}

Executor acts as a contract for various execution based logic

type MockExecutor

type MockExecutor struct {
	// contains filtered or unexported fields
}

MockExecutor is a mock of Executor interface

func NewMockExecutor

func NewMockExecutor(ctrl *gomock.Controller) *MockExecutor

NewMockExecutor creates a new mock instance

func (*MockExecutor) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockExecutor) Output

func (m *MockExecutor) Output(args []string) (string, error)

Output mocks base method

type MockExecutorMockRecorder

type MockExecutorMockRecorder struct {
	// contains filtered or unexported fields
}

MockExecutorMockRecorder is the mock recorder for MockExecutor

func (*MockExecutorMockRecorder) Output

func (mr *MockExecutorMockRecorder) Output(args interface{}) *gomock.Call

Output indicates an expected call of Output

type ShellExec

type ShellExec struct {
	// contains filtered or unexported fields
}

ShellExec is a shell based struct that implements Executor interface

func NewShellExec

func NewShellExec(binary string) *ShellExec

NewShellExec returns a new instance of shellExec based on the provided binary name

func (*ShellExec) Output

func (e *ShellExec) Output(args []string) (output string, err error)

Output executes the shell command and returns the output or error

Jump to

Keyboard shortcuts

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