Documentation ¶
Overview ¶
Package ioutil implements I/O utility functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrShortRead = fmt.Errorf("ioutil: short read") ErrExpectEOF = fmt.Errorf("ioutil: expect EOF") )
Functions ¶
func NewExactReadCloser ¶
func NewExactReadCloser(rc io.ReadCloser, totalBytes int64) io.ReadCloser
NewExactReadCloser returns a ReadCloser that returns errors if the underlying reader does not read back exactly the requested number of bytes.
func NewLimitedBufferReader ¶
NewLimitedBufferReader returns a reader that reads from the given reader but limits the amount of data returned to at most n bytes.
Types ¶
type PageWriter ¶ added in v3.0.7
type PageWriter struct {
// contains filtered or unexported fields
}
PageWriter implements the io.Writer interface so that writes will either be in page chunks or from flushing.
func NewPageWriter ¶ added in v3.0.7
func NewPageWriter(w io.Writer, pageBytes, pageOffset int) *PageWriter
NewPageWriter creates a new PageWriter. pageBytes is the number of bytes to write per page. pageOffset is the starting offset of io.Writer.
func (*PageWriter) Flush ¶ added in v3.0.7
func (pw *PageWriter) Flush() error
Click to show internal directories.
Click to hide internal directories.