execx

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(ctx context.Context, opts Command) error

Exec executes command.

func ExecString

func ExecString(ctx context.Context, args []string) (string, error)

ExecString executes command and returns its stdout as string.

func NewExecutionError

func NewExecutionError(err error, msg string) error

Types

type Command

type Command struct {
	Args      []string
	ExtraVars []string
	Dir       string
	Stdin     io.Reader
	Stdout    io.Writer
	Stderr    io.Writer
}

Command defines a command specification.

type ExecutionError

type ExecutionError struct {
	Inner   error
	Message string
}

func (*ExecutionError) Error

func (e *ExecutionError) Error() string

func (*ExecutionError) Unwrap

func (e *ExecutionError) Unwrap() error

Jump to

Keyboard shortcuts

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