Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Exec = func(cmd string, args ...string) (string, error) { cmdpath, err := exec.LookPath(cmd) if err != nil { klog.Errorf("exec.LookPath err: %v, cmd: %s", err, cmd) return "", infra.ErrExecLookPathFailed } var output []byte output, err = exec.Command(cmdpath, args...).CombinedOutput() if err != nil { klog.Errorf("exec.Command.CombinedOutput err: %v, cmd: %s, output: %s", err, cmd, string(output)) return "", infra.ErrExecCombinedOutputFailed } return string(output), nil }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.