Documentation ¶
Overview ¶
Package iotest implements Readers and Writers useful only for testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataErrReader ¶
DataErrReader returns a Reader that returns the final error with the last data read, instead of by itself with zero bytes of data.
func HalfReader ¶
HalfReader returns a Reader that implements Read by reading half as many requested bytes from r.
func NewReadLogger ¶
NewReadLogger returns a reader that behaves like r except that it logs (using log.Print) each read to standard error, printing the prefix and the hexadecimal data written.
func NewWriteLogger ¶
NewWriteLogger returns a writer that behaves like w except that it logs (using log.Printf) each write to standard error, printing the prefix and the hexadecimal data written.
func OneByteReader ¶
OneByteReader returns a Reader that implements each non-empty Read by reading one byte from r.
Types ¶
This section is empty.