exec

package
v1.4.11 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: MIT Imports: 9 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(opts Options, out io.Writer) error

func (CommandExecutor) RawExecute

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

type Executor

type Executor interface {
	Execute(opts Options, out io.Writer) error
	RawExecute(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, FailText  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