Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CountingReader ¶ added in v0.4.0
type CountingReader struct {
// contains filtered or unexported fields
}
CountingReader wraps an io.Reader, adding a ReadCount method to get the total bytes read over multiple calls to Read. This is helpful if the Reader passes through other functions that do not return the bytes read.
func NewCountingReader ¶ added in v0.4.0
func NewCountingReader(r io.Reader) *CountingReader
func (*CountingReader) ReadByte ¶ added in v0.4.0
func (cr *CountingReader) ReadByte() (byte, error)
func (*CountingReader) ReadCount ¶ added in v0.4.0
func (cr *CountingReader) ReadCount() int64
type CountingWriter ¶ added in v0.4.0
type CountingWriter struct {
// contains filtered or unexported fields
}
CountingWriter wraps an io.Writer, adding a Written method to get the total bytes written over multiple calls to Write. This is helpful if the Writer passes through other functions that do not return the bytes written.
func NewCountingWriter ¶ added in v0.4.0
func NewCountingWriter(w io.Writer) *CountingWriter
func (*CountingWriter) Write ¶ added in v0.4.0
func (cw *CountingWriter) Write(p []byte) (int, error)
func (*CountingWriter) Written ¶ added in v0.4.0
func (cw *CountingWriter) Written() int64
Click to show internal directories.
Click to hide internal directories.