mock

package
v0.48.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 1 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 {
	ExecuteInvoked bool
	ExecuteFn      func(context.Context, string, ...string) ([]byte, error)
}

Executor is a mock implementation of the command executor interface. It implements the same interface as mcp.Executor through structural typing.

func NewExecutor

func NewExecutor() *Executor

NewExecutor creates a new mock executor

func (*Executor) Execute

func (m *Executor) Execute(ctx context.Context, subcommand string, args ...string) ([]byte, error)

Execute implements the executor interface, recording invocation details and delegating to ExecuteFn if provided.

Jump to

Keyboard shortcuts

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