exec

package
v1.6.10 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandExecutor

type CommandExecutor struct{}

func (CommandExecutor) Execute

func (e CommandExecutor) Execute(ctx context.Context, opts Options, out io.Writer) error

func (CommandExecutor) RawExecute

func (e CommandExecutor) RawExecute(ctx context.Context, command []string, out io.Writer) error

type Executor

type Executor interface {
	Execute(ctx context.Context, opts Options, out io.Writer) error
	RawExecute(ctx context.Context, command []string, out io.Writer) error
}

Executor provides an interface for command execution. It is used here for testing purpose mostly.

type Options

type Options struct {
	Name, Root            string
	Commands              []string
	Env                   map[string]string
	Interactive, UseStdin bool
}

Options contains the data that controls the execution.

Jump to

Keyboard shortcuts

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