Documentation ¶
Index ¶
- type Buffer
- func (buf *Buffer) Bytes() []byte
- func (buf *Buffer) Len() int
- func (buf *Buffer) Reset()
- func (buf *Buffer) String() string
- func (buf *Buffer) StringUnsafe() string
- func (buf *Buffer) Write(b []byte) (int, error)
- func (buf *Buffer) WriteByte(b byte) error
- func (buf *Buffer) WriteString(s string) (int, 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 implements a subset of the write portion of bytes.Buffer, but more efficiently. This is meant to be used in very high QPS operations, especially for WriteByte, and without abstracting it as a Writer. Function signatures contain errors for compatibility, but they do not return errors.
func (*Buffer) Reset ¶ added in v0.11.0
func (buf *Buffer) Reset()
Reset is equivalent to bytes.Buffer.Reset.
func (*Buffer) StringUnsafe ¶ added in v0.11.0
StringUnsafe is equivalent to String, but the copy of the string that it returns is _not_ allocated, so modifying this buffer after calling StringUnsafe will lead to undefined behavior.
Click to show internal directories.
Click to hide internal directories.