shell

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2019 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BufferAndStreamOutput = gocmd.Options{
	Buffered:  true,
	Streaming: true,
}

BufferAndStreamOutput sets buffering and streaming of output when running gocmd.Cmd Buffering lets easy inspection of outputs in tests through inspecting gocmd.Cmd.Status.Stdout/err slices

View Source
var StreamOutput = gocmd.Options{
	Buffered:  false,
	Streaming: true,
}

StreamOutput sets streaming of output instead of buffering it when running gocmd.Cmd

Functions

func BinaryExists

func BinaryExists(binName, hint string) bool

BinaryExists ensures that binary with given name (binName) is available on the PATH hint lets you customize the error message

func CurrentDir

func CurrentDir() string

CurrentDir returns current directory from where binary is executed

func RedirectStreams

func RedirectStreams(src *gocmd.Cmd, stdoutDest, stderrDest io.Writer, done <-chan gocmd.Status)

RedirectStreams redirects Stdout and Stderr of the gocmd.Cmd process to passed io.Writers

func ShutdownHook

func ShutdownHook(cmd *gocmd.Cmd, done <-chan gocmd.Status)

ShutdownHook will wait for SIGTERM signal and stop the cmd unless done receiving channel passed to it receives status or is closed

func Start

func Start(cmd *gocmd.Cmd, done chan gocmd.Status)

Start starts new process (gocmd) and wait until it's done. Status struct is then propagated back to done channel passed as argument

Types

This section is empty.

Jump to

Keyboard shortcuts

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