Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor interface { Exec(command string, args ...string) error ExecWithOut(command string, args ...string) ([]byte, error) ExecInDir(command string, dir string, args ...string) error }
Executor executes commands shelling out and binding the stdout and stderr to the os ones
func NewShellExecutor ¶
NewShellExecutor creates a new executor that runs commands
type ShellExecutor ¶
type ShellExecutor struct {
// contains filtered or unexported fields
}
ShellExecutor an executor that shells out to run commands
func (ShellExecutor) Exec ¶
func (e ShellExecutor) Exec(command string, args ...string) error
Exec execute the command with the specified args
func (ShellExecutor) ExecInDir ¶
func (e ShellExecutor) ExecInDir(command string, dir string, args ...string) error
ExecInDir executes the command inside the directory with the specified args
func (ShellExecutor) ExecWithOut ¶
func (e ShellExecutor) ExecWithOut(command string, args ...string) ([]byte, error)
ExecWithOut executes the command with the specified args and returns the output
Click to show internal directories.
Click to hide internal directories.