executor

package
v0.0.0-...-d4af02a Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 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 {
	Execute(output io.Writer, workingDir string, name string, args ...string) error
	ExecuteAndCapture(output io.Writer, workingDir string, name string, args ...string) (string, error)
	SetVerbose(bool)
}

type FakeExecutor

type FakeExecutor struct {
	Handler          func(workingDir string, name string, args ...string) error
	ReturningHandler func(workingDir string, name string, args ...string) (string, error)
	// contains filtered or unexported fields
}

func NewAlternatingSuccessFakeExecutor

func NewAlternatingSuccessFakeExecutor() *FakeExecutor

func NewAlwaysFailsFakeExecutor

func NewAlwaysFailsFakeExecutor() *FakeExecutor

func NewAlwaysSucceedsFakeExecutor

func NewAlwaysSucceedsFakeExecutor() *FakeExecutor

func NewFakeExecutor

func NewFakeExecutor(handler func(string, string, ...string) error, returningHandler func(string, string, ...string) (string, error)) *FakeExecutor

func (*FakeExecutor) AssertCalledWith

func (e *FakeExecutor) AssertCalledWith(t *testing.T, expected [][]string)

func (*FakeExecutor) Execute

func (e *FakeExecutor) Execute(_ io.Writer, workingDir string, name string, args ...string) error

func (*FakeExecutor) ExecuteAndCapture

func (e *FakeExecutor) ExecuteAndCapture(_ io.Writer, workingDir string, name string, args ...string) (string, error)

func (*FakeExecutor) SetVerbose

func (e *FakeExecutor) SetVerbose(_ bool)

type RealExecutor

type RealExecutor struct {
	Verbose bool
}

func NewRealExecutor

func NewRealExecutor() *RealExecutor

func (*RealExecutor) Execute

func (e *RealExecutor) Execute(output io.Writer, workingDir string, name string, args ...string) error

func (*RealExecutor) ExecuteAndCapture

func (e *RealExecutor) ExecuteAndCapture(output io.Writer, workingDir string, name string, args ...string) (string, error)

func (*RealExecutor) SetVerbose

func (e *RealExecutor) SetVerbose(verbose bool)

Jump to

Keyboard shortcuts

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