execext

package
v3.54.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 ExpandFields added in v3.43.0

func ExpandFields(s string) ([]string, error)

ExpandFields is a wrapper around expand.Fields. It will escape the input string, expand any shell symbols (such as '~') and resolve any environment variables. It also expands brace expressions ({a.b}) and globs (*/**) and returns the results as a list of strings.

func ExpandLiteral added in v3.43.0

func ExpandLiteral(s string) (string, error)

ExpandLiteral is a wrapper around expand.Literal. It will escape the input string, expand any shell symbols (such as '~') and resolve any environment variables.

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