Documentation ¶
Overview ¶
Package executil contains some common wrappers for simple use of exec.Cmd.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CombinedOutput ¶
CombinedOutput runs a command and returns the output string of c.CombinedOutput.
func Dir ¶
Dir returns a command that runs in the given dir. The command can be passed to one of the other funcs in this package to evaluate it and optionally get the output as a string. Dir is useful to construct one-liner command calls, because setting the dir is commonly needed and not settable with exec.Command directly.
func MakeWorkDir ¶
MakeWorkDir creates a unique path inside the given root dir to use as a workspace. The name starts with the local time in a sortable format to help with browsing multiple workspaces. This function allows a command to run multiple times in sequence without overwriting or deleting the old data, for diagnostic purposes. This function uses os.MkdirAll to ensure the root dir exists.
Types ¶
This section is empty.