Documentation ¶
Overview ¶
Package streams provides a mockable wrapper for `os.Stdout` and `os.Stderr`.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithStderr ¶
ContextWithStderr overrides os.Stderr for all code that uses the returned context, as long as it accesses stderr using `streams.Stderr(ctx)` instead of using `os.Stderr` directly.
This should only be used in tests; production code should never override os.Stderr.
func ContextWithStdout ¶
ContextWithStdout overrides os.Stdout for all code that uses the returned context, as long as it accesses stdout using `streams.Stdout(ctx)` instead of using `os.Stdout` directly.
This should only be used in tests; production code should never override os.Stdout.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.