executor

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	Exec(command string, dir string, args ...string) error
}

Executor executes commands shelling out and binding the stdout and stderr to the os ones

func NewShellExecutor

func NewShellExecutor(envVars []string) Executor

NewShellExecutor creates a new executor that runs commands

type FakeExecutor

type FakeExecutor struct {
	mock.Mock
}

FakeExecutor is a test double that records the arguments used for calling it

func (*FakeExecutor) Exec

func (e *FakeExecutor) Exec(command string, dir string, args ...string) error

Exec records the arguments used to call it

type ShellExecutor

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

ShellExecutor an executor that shells out to run commands

func (ShellExecutor) Exec

func (e ShellExecutor) Exec(command string, dir string, args ...string) error

Exec execute the command inside the directory with the specified args

Jump to

Keyboard shortcuts

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