Documentation ¶
Overview ¶
Package bufio contains tools for reusing bufio.Reader and bufio.Writer.
Index ¶
- func AcquireReader(r io.Reader) *bufio.Reader
- func AcquireReaderSize(r io.Reader, size int) *bufio.Reader
- func AcquireWriter(w io.Writer) *bufio.Writer
- func AcquireWriterSize(w io.Writer, size int) *bufio.Writer
- func ReleaseReader(r *bufio.Reader, size int)
- func ReleaseWriter(w *bufio.Writer, size int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcquireReader ¶
AcquireWriter returns bufio.Writer with default buffer size.
func AcquireReaderSize ¶
AcquireReaderSize returns bufio.Reader with given buffer size. Note that size is rounded up to nearest highest power of two.
func AcquireWriter ¶
AcquireWriter returns bufio.Writer with default buffer size.
func AcquireWriterSize ¶
AcquireWriterSize returns bufio.Writer with given buffer size. Note that size is rounded up to nearest highest power of two.
func ReleaseReader ¶
ReleaseReaderSize takes bufio.Reader for future reuse. Note that size should be the same as used to acquire reader. If you have acquired reader from AcquireReader function, set size to 0. If size == 0 then default buffer size is used.
func ReleaseWriter ¶
ReleaseWriterSize takses bufio.Writer for future reuse. Note that size should be the same as used to acquire writer. If you have acquired writer from AcquireWriter function, set size to 0. If size == 0 then default buffer size is used.
Types ¶
This section is empty.