Go API Documentation

github.com/go-task/task/v3/internal/execext

No package summary is available.

Package

Files: 2. Third party imports: 3. Imports from organisation: 0. Tests: 0. Benchmarks: 0.

Vars

ErrNilOptions is returned when a nil options is given

Types

RunCommandOptions

RunCommandOptions is the options for the [RunCommand] func.

Field name Field type Comment
Command

string

No comment on field.
Dir

string

No comment on field.
Env

[]string

No comment on field.
PosixOpts

[]string

No comment on field.
BashOpts

[]string

No comment on field.
Stdin

io.Reader

No comment on field.
Stdout

io.Writer

No comment on field.
Stderr

io.Writer

No comment on field.

devNull

This type doesn't have documentation.

Functions

func ExpandFields

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.

Uses: expand.Config, expand.Fields, expand.FuncEnviron, os.Getenv, os.ReadDir, strings.NewReader, syntax.NewParser, syntax.Word.

func ExpandLiteral

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

Uses: expand.Config, expand.FuncEnviron, expand.Literal, os.Getenv, os.ReadDir, strings.NewReader, syntax.NewParser.

func RunCommand

RunCommand runs a shell command

Uses: expand.ListEnviron, fmt.Sprintf, interp.Env, interp.ExecHandlers, interp.New, interp.OpenHandler, interp.Params, interp.StdIO, os.Environ, strings.Join, strings.NewReader, syntax.NewParser.

func (devNull) Close

func (devNull) Read

Uses: io.EOF.

func (devNull) Write

Private functions

func dirOption

References: filepath.Abs, interp.Dir, interp.Runner, os.IsNotExist, os.Stat.

func execHandler

References: interp.DefaultExecHandler, time.Second.

func openHandler

References: interp.DefaultOpenHandler.