Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cmd ¶
type Cmd struct {
// contains filtered or unexported fields
}
Cmd is an external command being prepared or run.
func CommandContext ¶
CommandContext returns the Cmd struct to execute the named program with the given arguments.
type Command ¶
type Command interface { // Start starts the command but does not wait for it to complete. // It returns an error if the command fails to start. // The command must be started before calling Wait. Start() error // Wait waits for the command to exit and waits for any copying to stdin or copying // from stdout or stderr to complete. // Start must be called before calling Wait. Wait() error // Run starts the specified command and waits for it to complete. Run() error // SetIn sets the stdin of the command. SetIn(io.Reader) // SetOut sets the stdout of the command. SetOut(io.Writer) // SetErr sets the stderr of the command. SetErr(io.Writer) }
A Command is an external command being prepared or run. It tries to mimic the exec.Cmd.
Click to show internal directories.
Click to hide internal directories.