Versions in this module Expand all Collapse all v1 v1.0.0 Feb 3, 2025 Changes in this version + const DEFAULT_LINE_BUFFER_SIZE + const DEFAULT_STREAM_CHAN_SIZE + var ErrNotStarted = errors.New("command not running") + type Cmd struct + Args []string + Dir string + Env []string + Name string + Stderr chan string + Stdout chan string + func NewCmd(name string, args ...string) *Cmd + func NewCmdOptions(options Options, name string, args ...string) *Cmd + func (c *Cmd) Clone() *Cmd + func (c *Cmd) Done() <-chan struct{} + func (c *Cmd) Start() <-chan Status + func (c *Cmd) StartWithStdin(in io.Reader) <-chan Status + func (c *Cmd) Status() Status + func (c *Cmd) Stop() error + type ErrLineBufferOverflow struct + BufferFree int + BufferSize int + Line string + func (e ErrLineBufferOverflow) Error() string + type Options struct + BeforeExec []func(cmd *exec.Cmd) + Buffered bool + CombinedOutput bool + LineBufferSize uint + Streaming bool + type OutputBuffer struct + func NewOutputBuffer() *OutputBuffer + func (rw *OutputBuffer) Lines() []string + func (rw *OutputBuffer) Write(p []byte) (n int, err error) + type OutputStream struct + func NewOutputStream(streamChan chan string) *OutputStream + func (rw *OutputStream) Flush() + func (rw *OutputStream) Lines() <-chan string + func (rw *OutputStream) SetLineBufferSize(n int) + func (rw *OutputStream) Write(p []byte) (n int, err error) + type Status struct + Cmd string + Complete bool + Error error + Exit int + PID int + Runtime float64 + StartTs int64 + Stderr []string + Stdout []string + StopTs int64