exec

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEnv added in v0.1.0

func AddEnv(env ...string)

func Call

func Call(dir string, cmd ...string) error

func GetEnv added in v0.1.0

func GetEnv(key string) string

func Output

func Output(dir string, cmd ...string) ([]byte, error)

func Run

func Run(dir string, cmd ...string) error

func SetEnv added in v0.1.0

func SetEnv(env ...string)

func String

func String(dir string, cmd ...string) (string, error)

Types

type Cmd

type Cmd struct {
	Ctx    context.Context
	Dir    string
	Cmd    string
	Env    []string
	Args   []string
	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer
}

func (Cmd) AddEnv added in v0.1.0

func (c Cmd) AddEnv(env ...string) Cmd

func (Cmd) Build added in v0.1.0

func (c Cmd) Build() (cmd *exec.Cmd)

func (Cmd) Default added in v0.1.0

func (c Cmd) Default() Cmd

func (Cmd) Parse added in v0.1.0

func (c Cmd) Parse(cmd ...string) Cmd

Jump to

Keyboard shortcuts

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