Documentation
¶
Overview ¶
Package ioutil provides I/O utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogWriter ¶
LogWriter builds and returns an io.Writer that writes messages to the given logger. If the logger is nil, a no-op writer is returned.
If prefix is non-empty, it is prepended to each message. The done function must be called when the writer is no longer needed. It will flush any buffered text to the logger.
The returned writer is not thread-safe.
func LogfWriter ¶
LogfWriter builds an io.Writer that writes messages to the given logf-style function.
The function is expected to always add a newline to the end of messages.
func TestOutputWriter ¶
func TestOutputWriter(t TestOutput, prefix string) (w io.Writer)
TestOutputWriter builds and returns an io.Writer that writes messages to the given testing.TB. The returned writer is not thread-safe.
Types ¶
type TestOutput ¶
TestOutput allows writing to the test log.