Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader represents a buffer for reading from an io.Reader, or a byte slice.
func NewReaderBytes ¶
NewReaderBytes creates a new Reader which reads from a byte slice.
func (*Reader) PeekByte ¶
PeekByte returns the next byte in the stream without advancing the position of the reader.
func (*Reader) ReadByte ¶
ReadByte reads a single byte from the underlying io.Reader, or byte slice, and advances the position.
func (*Reader) ReadBytes ¶
ReadBytes reads the specified number of bytes from the underlying io.Reader, or byte slice, and advances the position.
func (*Reader) ReadString ¶
ReadString reads the specified length string from the underlying io.Reader, or byte slice, and advances the position.
func (*Reader) Reset ¶
Reset resets the Reader, and instructs it to read from the specified io.Reader.
func (*Reader) ResetBytes ¶
ResetBytes resets the Reader, and instructs it to read from the specified byte slice.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer represents a buffer for writing to an io.Writer, or a byte slice.
func NewWriterBytes ¶
NewWriterBytes creates a new Writer which writes to a byte slice.
func (*Writer) Flush ¶
Flush flushes any remaining buffered data to the underlying io.Writer. When writing to a byte slice, this function does not do anything, as data is written immediately.
func (*Writer) Reset ¶
Reset resets the Writer, and instructs it to write to the specified io.Writer.
func (*Writer) ResetBytes ¶
ResetBytes resets the Writer, and instructs it to write to the specified byte slice.
func (*Writer) WriteByte ¶
WriteByte writes a single byte to the underlying io.Writer, or byte slice.
func (*Writer) WriteBytes ¶
WriteBytes writes a slice of bytes to the underlying io.Writer, or byte slice.
func (*Writer) WriteString ¶
WriteString writes a string to the underlying io.Writer, or byte slice.