executr

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoCmd   = errors.New("executr: no command to execute")
	ErrTimeout = errors.New("executr: command timeout")
)

Functions

This section is empty.

Types

type Env

type Env map[string]string

func (Env) Strings

func (ev Env) Strings() []string

type Executr

type Executr interface {
	Run(ctx context.Context) error
	Stdin() io.Reader
	Stdout() io.Writer
	Stderr() io.Writer
}

func New

func New(opts ...Opt) Executr

type Opt

type Opt func(*Opts)

type Opts

type Opts struct {
	Cmd     string
	Dir     string
	Env     Env
	Stdin   io.Reader
	Stdout  io.Writer
	Stderr  io.Writer
	Timeout time.Duration
}

Jump to

Keyboard shortcuts

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