execext

package
v3.37.2 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNilOptions = errors.New("execext: nil options given")

ErrNilOptions is returned when a nil options is given

Functions

func Expand

func Expand(s string) (string, error)

Expand is a helper to mvdan.cc/shell.Fields that returns the first field if available.

func IsExitError

func IsExitError(err error) bool

IsExitError returns true the given error is an exis status error

func RunCommand

func RunCommand(ctx context.Context, opts *RunCommandOptions) error

RunCommand runs a shell command

Types

type RunCommandOptions

type RunCommandOptions struct {
	Command   string
	Dir       string
	Env       []string
	PosixOpts []string
	BashOpts  []string
	Stdin     io.Reader
	Stdout    io.Writer
	Stderr    io.Writer
}

RunCommandOptions is the options for the RunCommand func

Jump to

Keyboard shortcuts

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