Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
func NewCommand ¶
func (*Command) Run ¶
func (c *Command) Run(opts *RunOptions) error
func (*Command) RunStdBytes ¶
func (c *Command) RunStdBytes(opts *RunOptions) (stdout, stderr []byte, err error)
RunStdBytes runs the command with options and returns stdout/stderr as bytes
func (*Command) RunStdString ¶
func (c *Command) RunStdString(opts *RunOptions) (stdout, stderr string, err error)
RunStdString runs the command with options and returns stdout/stderr as string
type RunOptions ¶
type RunOptions struct { Dir string Env map[string]string Stdin io.Reader // When using Stdout, it's impossible to use PipeReader Stdout io.Writer // When using Stderr, it's impossible to use PipeReader Stderr io.Writer // When using PipeReader, it's impossible to use Stdout or/and Stderr PipeReader func(stdout, stderr io.ReadCloser) Timeout time.Duration }
Click to show internal directories.
Click to hide internal directories.