Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferedCommand ¶
func NewBufferedCommand ¶
func NewBufferedCommand(cmd string, opts ...CommandOption) *BufferedCommand
type Command ¶
type Command interface { Command() string // Stdin is an io.Reader for the standard input // Stdin is used by the executing System Stdin() io.Reader // Stdout is an io.Writer for the standard output // Stdout is used by the executing System Stdout() io.Writer // Stderr is an io.Writer for the standard error // Stderr is used by the executing System Stderr() io.Writer }
func NewCommand ¶
func NewCommand(cmd string, opts ...CommandOption) Command
func NewCommandWithFunc ¶
func NewCommandWithFunc(cmdFunc func() string, opts ...CommandOption) Command
type CommandOption ¶
type CommandOption func(*command)
func CombinedOutput ¶
func CombinedOutput(out io.Writer) CommandOption
func Passthrough ¶
func Passthrough(parent Command) CommandOption
func Stderr ¶
func Stderr(stderr io.Writer) CommandOption
func Stdin ¶
func Stdin(stdin io.Reader) CommandOption
func Stdout ¶
func Stdout(stdout io.Writer) CommandOption
type Middleware ¶
Middleware wraps to a command similar to a http middleware.
func ShMiddleware ¶
func ShMiddleware() Middleware
ShMiddleware returns a Middleware which executes a command using the shell /bin/sh
func SudoShMiddleware ¶
func SudoShMiddleware() Middleware
SudoShMiddleware returns a Middleware which executes a command using `sudo`
Click to show internal directories.
Click to hide internal directories.