Documentation ¶
Index ¶
- type Buffer
- func (llb *Buffer) Buffered() int
- func (llb *Buffer) Discard(n int) (discarded int, err error)
- func (llb *Buffer) IsEmpty() bool
- func (llb *Buffer) Len() int
- func (llb *Buffer) Peek(maxBytes int) [][]byte
- func (llb *Buffer) PeekWithBytes(maxBytes int, bs ...[]byte) [][]byte
- func (llb *Buffer) PushBack(p []byte)
- func (llb *Buffer) PushFront(p []byte)
- func (llb *Buffer) Read(p []byte) (n int, err error)
- func (llb *Buffer) ReadFrom(r io.Reader) (n int64, err error)
- func (llb *Buffer) Reset()
- func (llb *Buffer) WriteTo(w io.Writer) (n int64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Buffer is a linked list of node.
func (*Buffer) Buffered ¶
Buffered returns the number of bytes that can be read from the current buffer.
func (*Buffer) Peek ¶
Peek assembles the up to maxBytes of [][]byte based on the list of node, it won't remove these nodes from l until Discard() is called.
func (*Buffer) PeekWithBytes ¶
PeekWithBytes is like Peek but accepts [][]byte and puts them onto head.
func (*Buffer) PushFront ¶
PushFront is a wrapper of pushFront, which accepts []byte as its argument.
Click to show internal directories.
Click to hide internal directories.