Documentation ¶
Index ¶
- func CmdRan(err error) bool
- func Exec(env map[string]string, stdout, stderr io.Writer, cmd string, args ...string) (ran bool, err error)
- func ExitStatus(err error) int
- func Output(cmd string, args ...string) (string, error)
- func OutputPanic(cmd string, args ...string) string
- func OutputWithEnv(env map[string]string, cmd string, args ...string) (string, error)
- func OutputWithEnvWithInput(env map[string]string, cmd string, in string, args ...string) (string, error)
- func OutputWithInput(cmd string, in string, args ...string) (string, error)
- func Run(cmd string, args ...string) error
- func RunPanic(cmd string, args ...string)
- func RunV(cmd string, args ...string) error
- func RunVCapture(cmd string, args ...string) (string, string, error)
- func RunVPanic(cmd string, args ...string)
- func RunVPanicWithEnv(env map[string]string, cmd string, args ...string)
- func RunVWithEnv(env map[string]string, cmd string, args ...string) error
- func RunVWithEnvWithInput(env map[string]string, cmd string, in string, args ...string) error
- func RunVWithInput(cmd string, in string, args ...string) error
- func RunWithEnv(env map[string]string, cmd string, args ...string) error
- func RunWithEnvWithInput(env map[string]string, cmd string, in string, args ...string) error
- func RunWithInput(cmd string, in string, args ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Exec ¶
func Exec(env map[string]string, stdout, stderr io.Writer, cmd string, args ...string) (ran bool, err error)
Copied from mage
func ExitStatus ¶
ExitStatus returns the exit status of the error if it is an exec.ExitError or if it implements ExitStatus() int. 0 if it is nil or 1 if it is a different error.
func OutputPanic ¶
Returns output from stdout, and panics on error stderr gets used as normal here
func OutputWithEnv ¶
func OutputWithEnvWithInput ¶
func Run ¶
Run command.
If mage is run with -v flag, stdout will be used to print output, if not, output will be hidden. Stderr will work as normal
func RunPanic ¶
Run command.
If mage is run with -v flag, stdout will be used to print output, if not, output will be hidden. Stderr will work as normal Will automatically panic on error
func RunVCapture ¶
Run command and print any output to stdout/stderr Also return stdout/stderr as strings
func RunVPanic ¶
Run command and print any output to stdout/stderr Will automatically panic on error
func RunVWithEnvWithInput ¶
func RunWithEnvWithInput ¶
Types ¶
This section is empty.