executer

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package executer is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonExecuter

type CommonExecuter struct{}

func (*CommonExecuter) CommandContext added in v0.2.0

func (e *CommonExecuter) CommandContext(ctx context.Context, command string, args ...string) *exec.Cmd

func (*CommonExecuter) Execute

func (e *CommonExecuter) Execute(command string, args ...string) (stdout string, stderr string, exitCode int)

func (*CommonExecuter) ExecuteWithContext

func (e *CommonExecuter) ExecuteWithContext(ctx context.Context, command string, args ...string) (stdout string, stderr string, exitCode int)

func (*CommonExecuter) ExecuteWithContextFromDir

func (e *CommonExecuter) ExecuteWithContextFromDir(ctx context.Context, workingDir string, command string, args []string, env ...string) (stdout string, stderr string, exitCode int)

func (*CommonExecuter) LookPath

func (e *CommonExecuter) LookPath(file string) (string, error)

func (*CommonExecuter) TempFile

func (e *CommonExecuter) TempFile(dir, pattern string) (f *os.File, err error)

type Executer

type Executer interface {
	CommandContext(ctx context.Context, command string, args ...string) *exec.Cmd
	Execute(command string, args ...string) (stdout string, stderr string, exitCode int)
	ExecuteWithContext(ctx context.Context, command string, args ...string) (stdout string, stderr string, exitCode int)
	ExecuteWithContextFromDir(ctx context.Context, workingDir string, command string, args []string, env ...string) (stdout string, stderr string, exitCode int)
	TempFile(dir, pattern string) (f *os.File, err error)
	LookPath(file string) (string, error)
}

type MockExecuter

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

MockExecuter is a mock of Executer interface.

func NewMockExecuter

func NewMockExecuter(ctrl *gomock.Controller) *MockExecuter

NewMockExecuter creates a new mock instance.

func (*MockExecuter) CommandContext added in v0.2.0

func (m *MockExecuter) CommandContext(ctx context.Context, command string, args ...string) *exec.Cmd

CommandContext mocks base method.

func (*MockExecuter) EXPECT

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

func (*MockExecuter) Execute

func (m *MockExecuter) Execute(command string, args ...string) (string, string, int)

Execute mocks base method.

func (*MockExecuter) ExecuteWithContext

func (m *MockExecuter) ExecuteWithContext(ctx context.Context, command string, args ...string) (string, string, int)

ExecuteWithContext mocks base method.

func (*MockExecuter) ExecuteWithContextFromDir

func (m *MockExecuter) ExecuteWithContextFromDir(ctx context.Context, workingDir, command string, args []string, env ...string) (string, string, int)

ExecuteWithContextFromDir mocks base method.

func (*MockExecuter) LookPath

func (m *MockExecuter) LookPath(file string) (string, error)

LookPath mocks base method.

func (*MockExecuter) TempFile

func (m *MockExecuter) TempFile(dir, pattern string) (*os.File, error)

TempFile mocks base method.

type MockExecuterMockRecorder

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

MockExecuterMockRecorder is the mock recorder for MockExecuter.

func (*MockExecuterMockRecorder) CommandContext added in v0.2.0

func (mr *MockExecuterMockRecorder) CommandContext(ctx, command any, args ...any) *gomock.Call

CommandContext indicates an expected call of CommandContext.

func (*MockExecuterMockRecorder) Execute

func (mr *MockExecuterMockRecorder) Execute(command any, args ...any) *gomock.Call

Execute indicates an expected call of Execute.

func (*MockExecuterMockRecorder) ExecuteWithContext

func (mr *MockExecuterMockRecorder) ExecuteWithContext(ctx, command any, args ...any) *gomock.Call

ExecuteWithContext indicates an expected call of ExecuteWithContext.

func (*MockExecuterMockRecorder) ExecuteWithContextFromDir

func (mr *MockExecuterMockRecorder) ExecuteWithContextFromDir(ctx, workingDir, command, args any, env ...any) *gomock.Call

ExecuteWithContextFromDir indicates an expected call of ExecuteWithContextFromDir.

func (*MockExecuterMockRecorder) LookPath

func (mr *MockExecuterMockRecorder) LookPath(file any) *gomock.Call

LookPath indicates an expected call of LookPath.

func (*MockExecuterMockRecorder) TempFile

func (mr *MockExecuterMockRecorder) TempFile(dir, pattern any) *gomock.Call

TempFile indicates an expected call of TempFile.

Jump to

Keyboard shortcuts

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