spawn

package
v1.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(command string, arguments ...string) (string, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL