executil

package
v0.0.0-...-d1d2547 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2018 License: Apache-2.0 Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(program string, args ...string) ([]byte, error)

Exec is a convenience method to run programs with arguments and return their combined stdout/stderr output as bytes.

func ExecPipe

func ExecPipe(program string, args ...string) error

ExecPipe is a convenience method to run programs with arguments and return their combined stdout/stderr output while printing them both to calling process' stdout.

func ExecPipeToFds

func ExecPipeToFds(fds Fds, program string, args ...string) error

ExecPipeToFds runs the program with specified args and given out/err descriptiors. Non-specified (nil) descriptors will be replaced with default out stream.

func ExecWithStdin

func ExecWithStdin(in io.ReadCloser, program string, args ...string) ([]byte, error)

ExecWithStdin pipes given ReadCloser's contents to the stdin of executed command and returns stdout as bytes and redirects stderr of executed command stderr of executing process.

func SetOut

func SetOut(o io.Writer)

Types

type Fds

type Fds struct{ Out, Err io.Writer }

Jump to

Keyboard shortcuts

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