gcmd

package
v0.0.0-...-652ca79 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCmdTerminated = errors.New("command terminated")
)

Functions

func Execute

func Execute(c []string, terminate <-chan struct{}) ([]byte, error)

Execute is a concurrent wrapper around Go's os/exec Output() method. It runs a command, and returns its standard output as a byte slice. If a long-running command is being executed, it can easily be killed at any time using the terminate channel as the process is spawned in a Goroutine.

Types

This section is empty.

Jump to

Keyboard shortcuts

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