Documentation ¶
Index ¶
- type CommandDoer
- func (c CommandDoer) Do(ctx context.Context) error
- func (c CommandDoer) DoWithErrorHandling(ctx context.Context, errorFunc ErrorFunc) error
- func (c CommandDoer) WithStderr(w io.Writer) CommandDoer
- func (c CommandDoer) WithStdin(r io.Reader) CommandDoer
- func (c CommandDoer) WithStdout(w io.Writer) CommandDoer
- type Doer
- type ErrorFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandDoer ¶
type CommandDoer struct {
// contains filtered or unexported fields
}
func Command ¶
func Command(cmd string, args ...string) CommandDoer
func (CommandDoer) DoWithErrorHandling ¶
func (c CommandDoer) DoWithErrorHandling(ctx context.Context, errorFunc ErrorFunc) error
DoWithErrorHandling executes the command and runs errorFunc passing a resulting err, stdout and stderr to be handled by the caller. The errorFunc is going to be called only when the resulting err != nil.
func (CommandDoer) WithStderr ¶
func (c CommandDoer) WithStderr(w io.Writer) CommandDoer
func (CommandDoer) WithStdin ¶
func (c CommandDoer) WithStdin(r io.Reader) CommandDoer
func (CommandDoer) WithStdout ¶
func (c CommandDoer) WithStdout(w io.Writer) CommandDoer
Click to show internal directories.
Click to hide internal directories.