executor

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: MIT Imports: 3 Imported by: ? modules, 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

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