gcmd

package
v2.16.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2019 License: MIT Imports: 6 Imported by: 5

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