Documentation
¶
Index ¶
- type Cmd
- func (c *Cmd) CombinedOutput() ([]byte, error)
- func (c *Cmd) Run() error
- func (c *Cmd) WithDir(dir string) *Cmd
- func (c *Cmd) WithEnv(env []string) *Cmd
- func (c *Cmd) WithStderr(stderr io.Writer) *Cmd
- func (c *Cmd) WithStdin(stdin io.Reader) *Cmd
- func (c *Cmd) WithStdout(stdout io.Writer) *Cmd
- func (c *Cmd) WithTimeout(timeout time.Duration) *Cmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cmd ¶
type Cmd struct {
Name string
Args []string
Timeout time.Duration
Dir string
Env []string
Stdout io.Writer
Stderr io.Writer
Stdin io.Reader
// contains filtered or unexported fields
}
Cmd represents a Cmd to be executed.
func CommandContext ¶
CommandContext creates a new command instance with context.
func NewCommand ¶
NewCommand creates a new command instance.
func (*Cmd) CombinedOutput ¶
CombinedOutput runs the command and returns its combined standard output and standard error.
func (*Cmd) WithStderr ¶
WithStderr sets the stderr writer for the command.
func (*Cmd) WithStdout ¶
WithStdout sets the stdout writer for the command.
Click to show internal directories.
Click to hide internal directories.