Documentation ¶
Index ¶
- type CommandWrapper
- func (c *CommandWrapper) OutputWriter(outputWriter io.Writer) *CommandWrapper
- func (c *CommandWrapper) Run() error
- func (c *CommandWrapper) RunAndGetOutput() (string, error)
- func (c *CommandWrapper) ShowOutput(value bool) *CommandWrapper
- func (c *CommandWrapper) WorkingDir(workDir DirPath) *CommandWrapper
- type DirPath
- type LineParsingWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandWrapper ¶
type CommandWrapper struct {
// contains filtered or unexported fields
}
func Command ¶
func Command(command string, args ...string) *CommandWrapper
func (*CommandWrapper) OutputWriter ¶
func (c *CommandWrapper) OutputWriter(outputWriter io.Writer) *CommandWrapper
func (*CommandWrapper) Run ¶
func (c *CommandWrapper) Run() error
func (*CommandWrapper) RunAndGetOutput ¶
func (c *CommandWrapper) RunAndGetOutput() (string, error)
func (*CommandWrapper) ShowOutput ¶
func (c *CommandWrapper) ShowOutput(value bool) *CommandWrapper
func (*CommandWrapper) WorkingDir ¶
func (c *CommandWrapper) WorkingDir(workDir DirPath) *CommandWrapper
type LineParsingWriter ¶
type LineParsingWriter struct {
// contains filtered or unexported fields
}
LineParsingWriter is a Writer that buffers output by line, and calls the specified function for each line.
func NewLineParsingWriter ¶
func NewLineParsingWriter(outputFn func(string)) *LineParsingWriter
NewLineParsingWriter creates a LineParsingWriter.
func NewLogWriter ¶
func NewLogWriter(dest io.Writer, logPrefix string) *LineParsingWriter
NewLogWriter returns a LineParsingWriter that writes to log.Println with the specified prefix.
func (*LineParsingWriter) Flush ¶
func (w *LineParsingWriter) Flush()
Flush writes any buffered incomplete line.
Click to show internal directories.
Click to hide internal directories.