Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Command ¶
Command runs a command with its arguments and returns the stdout or stderr or the error.
func CommandExecWithContext ¶ added in v1.10.0
func CommandExecWithContext(ctx context.Context, command string, arguments ...string) (string, error)
CommandExecWithContext runs a command with its arguments, kills the command after context is done and returns the combined stdout, stderr or the error.
func CommandWithContext ¶ added in v1.9.0
func CommandWithContext(ctx context.Context, command string, arguments ...string) (chan string, chan string, error)
CommandWithContext runs a command with its arguments in background. The provided context is used to kill the command (by calling os.Process.Kill) if the context becomes done before the command completes on its own. The return channels can be used to read stdout & stderr.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.