command

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExecCommander = execCommander{}

ExecCommander creates commands using the os/exec package.

Functions

This section is empty.

Types

type Command

type Command interface {
	Start() error
	Wait() error

	Stdin(io.Reader)
	Stdout(io.Writer)
	Stderr(io.Writer)
	StdinPipe() (io.WriteCloser, error)
	StdoutPipe() (io.Reader, error)
	StderrPipe() (io.Reader, error)

	Kill()
}

type Commander

type Commander interface {
	NewCommand(Spec) Command
}

Commander creates new commands.

type Spec added in v1.2.0

type Spec struct {
	Prog string
	Args []string
	Env  []string
}

Spec contains the necessary information to create a new command.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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