func DisableMarshaledExits()
DisableMarshaledExits disables exit marshaling.
func EnableMarshaledExits()
EnableMarshaledExits enables exit marshaling.
func Exit(returnCode int)
Exit will marshal an exit into a panic if marshaling is turned on. If not turned on, forward through to `os.Exit()`.
func IsTtyRedirected() bool
IsTtyRedirected returns whether the TTY is currently redirected.
func RedirectTty()
RedirectTty redirects STDIN, STDOUT, and STDERR to alternative resources. This allows us to create unit-tests for executables by directly calling their main() entrypoints.
func RestoreAndDumpTty()
RestoreAndDumpTty restores original TTY resources but not before grabbing their screen output and then printing it before returning.
func RestoreTty()
RestoreTty restores original TTY resources.
func StderrReader() *os.File
StderrReader returns a reader that can be used to read STDERR output (if redirected).
func StdinWriter() *os.File
StdinWriter returns a writer that can be used to feed STDIN data (if redirected).
func StdoutReader() *os.File
StdoutReader returns a reader that can be used to read STDOUT output (if redirected).