package buffer

Import Path
	go.uber.org/zap/buffer (on go.dev)

Dependency Relation
	imports 3 packages, and imported by 3 packages

Involved Source Files Package buffer provides a thin wrapper around a byte slice. Unlike the standard library's bytes.Buffer, it supports a portion of the strconv package's zero-allocation formatters. pool.go
Package-Level Type Names (total 2, both are exported)
/* sort exporteds by: | */
Buffer is a thin wrapper around a byte slice. It's intended to be pooled, so the only way to construct one is via a Pool. AppendBool appends a bool to the underlying buffer. AppendByte writes a single byte to the Buffer. AppendBytes writes a single byte to the Buffer. AppendFloat appends a float to the underlying buffer. It doesn't quote NaN or +/- Inf. AppendInt appends an integer to the underlying buffer (assuming base 10). AppendString writes a string to the Buffer. AppendTime appends the time formatted using the specified layout. AppendUint appends an unsigned integer to the underlying buffer (assuming base 10). Bytes returns a mutable reference to the underlying byte slice. Cap returns the capacity of the underlying byte slice. Free returns the Buffer to its Pool. Callers must not retain references to the Buffer after calling Free. Len returns the length of the underlying byte slice. Reset resets the underlying byte slice. Subsequent writes re-use the slice's backing array. String returns a string copy of the underlying byte slice. TrimNewline trims any final "\n" byte from the end of the buffer. Write implements io.Writer. WriteByte writes a single byte to the Buffer. Error returned is always nil, function signature is compatible with bytes.Buffer and bufio.Writer WriteString writes a string to the Buffer. Error returned is always nil, function signature is compatible with bytes.Buffer and bufio.Writer *Buffer : fmt.Stringer *Buffer : internal/bisect.Writer *Buffer : io.ByteWriter *Buffer : io.StringWriter *Buffer : io.Writer func Pool.Get() *Buffer func go.uber.org/zap/zapcore.Encoder.EncodeEntry(zapcore.Entry, []zapcore.Field) (*Buffer, error) func go.uber.org/zap/internal/stacktrace.NewFormatter(b *Buffer) stacktrace.Formatter
A Pool is a type-safe wrapper around a sync.Pool. Get retrieves a Buffer from the pool, creating one if necessary. func NewPool() Pool
Package-Level Functions (only one, which is exported)
NewPool constructs a new Pool.
Package-Level Constants (only one, which is unexported)