package iotest
Import Path
testing/iotest (on golang.org and go.dev)
Dependency Relation
imports 3 packages, and imported by 0 packages
Involved Source Files
logger.go
d-> reader.go
writer.go
Exported Type Names
(none)
Exported Values
func
DataErrReader(r
io.
Reader)
io.
Reader
DataErrReader changes the way errors are handled by a Reader. Normally, a
Reader returns an error (typically EOF) from the first Read call after the
last piece of data is read. DataErrReader wraps a Reader and changes its
behavior so the final error is returned along with the final data, instead
of in the first call after the final data.
func
HalfReader(r
io.
Reader)
io.
Reader
HalfReader returns a Reader that implements Read
by reading half as many requested bytes from r.
func
NewReadLogger(prefix
string, r
io.
Reader)
io.
Reader
NewReadLogger returns a reader that behaves like r except
that it logs (using log.Printf) each read to standard error,
printing the prefix and the hexadecimal data read.
func
NewWriteLogger(prefix
string, w
io.
Writer)
io.
Writer
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.
 |
The pages are generated with Golds v0.1.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project and developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |