shellout

package
v0.0.0-...-0b51e07 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pipe

func Pipe(tee bool, cmds ...*Cmd) error

func RunAll

func RunAll(cmds ...*Cmd) []error

Types

type Cmd

type Cmd struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, options ...Option) *Cmd

func (*Cmd) Args

func (ex *Cmd) Args() []string

func (*Cmd) Pipe

func (ex *Cmd) Pipe(other *Cmd, tee bool) error

func (*Cmd) Ref

func (ex *Cmd) Ref() *exec.Cmd

func (*Cmd) Run

func (ex *Cmd) Run() error

func (*Cmd) RunBytes

func (ex *Cmd) RunBytes() ([]byte, error)

func (*Cmd) RunString

func (ex *Cmd) RunString() (string, error)

type CmdPipe

type CmdPipe struct {
	// contains filtered or unexported fields
}

type Option

type Option func(ex *Cmd)

func Args

func Args(path string, args ...string) Option

func ArgsAdd

func ArgsAdd(args ...string) Option

func ArgsAddFN

func ArgsAddFN(fn func() (args []string)) Option

func BindStderr

func BindStderr(b io.Writer) Option

func BindStdin

func BindStdin(b io.Reader) Option

func BindStdout

func BindStdout(b io.Writer) Option

func EnvSet

func EnvSet(env map[string]string) Option

func Passthrough

func Passthrough() Option

Jump to

Keyboard shortcuts

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