Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableMarshaledExits ¶
func DisableMarshaledExits()
DisableMarshaledExits disables exit marshaling.
func EnableMarshaledExits ¶
func EnableMarshaledExits()
EnableMarshaledExits enables exit marshaling.
func Exit ¶
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 ¶
func IsTtyRedirected() bool
IsTtyRedirected returns whether the TTY is currently redirected.
func RedirectTty ¶
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 ¶
func RestoreAndDumpTty()
RestoreAndDumpTty restores original TTY resources but not before grabbing their screen output and then printing it before returning.
func StderrReader ¶
StderrReader returns a reader that can be used to read STDERR output (if redirected).
func StdinWriter ¶
StdinWriter returns a writer that can be used to feed STDIN data (if redirected).
func StdoutReader ¶
StdoutReader returns a reader that can be used to read STDOUT output (if redirected).
Types ¶
This section is empty.