fake

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: AGPL-3.0 Imports: 2 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 struct {
	Responses []Response
	Commands  []string
}

Executor is a test double for commandexecutor.CommandExecutor. It records every command and returns configured responses in order.

func NewExecutor

func NewExecutor(outputs ...string) *Executor

func (*Executor) Execute

func (e *Executor) Execute(_ context.Context, command string) (string, error)

func (*Executor) MustExecute

func (e *Executor) MustExecute(ctx context.Context, command string) string

type Response

type Response struct {
	Output string
	Err    error
}

Jump to

Keyboard shortcuts

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