# README
goexec
Package goexec is a fluent decorator based API for os/exec.
Looking for v1, see the master branch
Quick Start
go get -u github.com/brad-jones/goexec/v2
package main
import (
"github.com/brad-jones/goexec/v2"
)
func main() {
goexec.Run("ping", "-c", "4", "8.8.8.8")
}
Also see further working examples under: https://github.com/brad-jones/goexec/tree/v2/examples
# Packages
No description provided by the author
# Functions
Args allows you to define the arguments sent to the command to be run.
Cmd provides a fluent, decorator based API for os/exec.
Cwd allows you to configure the working directory of the command to be run.
Env allows you to set the exact environment in which the command will be run.
EnvCombined will add the variables you provide to the existing environment.
MustCmd does the same as Cmd but panics if an error is encountered.
MustPipe does the same as Pipe but panics if an error is encountered.
MustPipeBuffered does the same as PipeBuffered but panics if an error is encountered.
MustPipePrefixed does the same as PipePrefixed but panics if an error is encountered.
MustRun does the same as Run but panics if an error is encountered.
MustRunBuffered does the same as RunBuffered but panics if an error is encountered.
MustRunBufferedCmd does the same as RunBufferedCmd but panics if an error is encountered.
MustRunPrefixed does the same as RunPrefixed but panics if an error is encountered.
MustRunPrefixedCmd does the same as RunPrefixedCmd but panics if an error is encountered.
Pipe will send the output of the first command to the input of the second and so on.
PipeAsync does the same as Pipe but does so asynchronously.
PipeBuffered will buffer all StdOut and StdErr, returning the buffers.
PipeBufferedAsync does the same as PipeBuffered but does so asynchronously.
PipePrefixed will prefix all StdOut and StdErr with given prefix.
PipePrefixedAsync does the same as PipePrefixed but does so asynchronously.
Run is a convenience function for simple cases.
RunAsync does the same as Run but does so asynchronously.
RunBuffered is a convenience function for simple cases.
RunBufferedAsync does the same as RunBuffered but does so asynchronously.
RunBufferedCmd will buffer all StdOut and StdErr, returning the buffers.
RunBufferedCmdAsync does the same as RunBufferedCmd but does so asynchronously.
RunPrefixed is a convenience function for simple cases.
RunPrefixedAsync does the same as RunPrefixed but does so asynchronously.
RunPrefixedCmd will prefix all StdOut and StdErr with given prefix.
RunPrefixedCmdAsync does the same as RunPrefixedCmd but does so asynchronously.
SetErr allows you to set a custom StdErr stream.
SetIn allows you to set a custom StdIn stream.
SetOut allows you to set a custom StdOut stream.
# Structs
StdBytes represents the buffered output from a process.
StdStrings represents the buffered output from a process after having been casted to strings.