Documentation ¶
Index ¶
- Constants
- Variables
- func Command(name string, args ...string) *exec.Cmd
- func Redact(items []string) func(text string) string
- func Run(cmd *exec.Cmd) (string, error)
- func RunCommandExt(cmd *exec.Cmd, opts CmdOpts) (string, error)
- func WaitPID(pid int, opts ...WaitPIDOpts) error
- type CmdError
- type CmdOpts
- type WaitPIDOpts
Constants ¶
View Source
const DefaultTimeout = 10 * time.Minute
Variables ¶
View Source
var ( ErrWaitPIDTimeout = fmt.Errorf("timed out waiting for PID to complete") Unredacted = Redact(nil) )
View Source
var DefaultCmdOpts = CmdOpts{ Timeout: time.Duration(0), Redactor: Unredacted, }
Functions ¶
func RunCommandExt ¶
RunCommandExt is a convenience function to run/log a command and return/log stderr in an error upon failure.
func WaitPID ¶
func WaitPID(pid int, opts ...WaitPIDOpts) error
WaitPID waits for a non-child process id to exit
Types ¶
Click to show internal directories.
Click to hide internal directories.