Documentation ¶
Index ¶
- func LookPath(file string) (string, error)deprecated
- func RunCommand(name string, arg ...string) (err error)
- func RunCommandAndReturn(name, dir string, args ...string) (result string, err error)
- func RunCommandInDir(name, dir string, args ...string) error
- func RunCommandWithBuffer(name, dir string, stdout, stderr *bytes.Buffer, args ...string) error
- func RunCommandWithIO(name, dir string, stdout, stderr io.Writer, args ...string) (err error)
- func RunCommandWithSudo(name string, args ...string) (err error)
- type DefaultExecer
- type Execer
- type FakeExecer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunCommandAndReturn ¶ added in v0.0.31
RunCommandAndReturn runs a command, then returns the output
func RunCommandInDir ¶
RunCommandInDir runs a command
func RunCommandWithBuffer ¶ added in v0.0.31
RunCommandWithBuffer runs a command with buffer stdout and stderr could be nil
func RunCommandWithIO ¶ added in v0.0.31
RunCommandWithIO runs a command with given IO
func RunCommandWithSudo ¶ added in v0.0.34
RunCommandWithSudo runs a command with sudo
Types ¶
type DefaultExecer ¶ added in v0.0.68
type DefaultExecer struct { }
DefaultExecer is a wrapper for the OS exec
type FakeExecer ¶ added in v0.0.68
type FakeExecer struct {
ExpectError error
}
FakeExecer is for the unit test purposes
Click to show internal directories.
Click to hide internal directories.