package buffer
import "golang.org/x/exp/slog/internal/buffer"
Package buffer provides a pool-allocated byte buffer.
Index ¶
- type Buffer
- func New() *Buffer
- func (b *Buffer) Free()
- func (b *Buffer) Reset()
- func (b *Buffer) String() string
- func (b *Buffer) Write(p []byte) (int, error)
- func (b *Buffer) WriteByte(c byte)
- func (b *Buffer) WritePosInt(i int)
- func (b *Buffer) WritePosIntWidth(i, width int)
- func (b *Buffer) WriteString(s string)
Types ¶
type Buffer ¶
type Buffer []byte
Buffer adapted from go/src/fmt/print.go
func New ¶
func New() *Buffer
func (*Buffer) Free ¶
func (b *Buffer) Free()
func (*Buffer) Reset ¶
func (b *Buffer) Reset()
func (*Buffer) String ¶
func (*Buffer) Write ¶
func (*Buffer) WriteByte ¶
func (*Buffer) WritePosInt ¶
func (*Buffer) WritePosIntWidth ¶
WritePosIntWidth writes non-negative integer i to the buffer, padded on the left by zeroes to the given width. Use a width of 0 to omit padding.
func (*Buffer) WriteString ¶
Source Files ¶
buffer.go
- Version
- v0.0.0-20250218142911-aa4b98e5adaa (latest)
- Published
- Feb 18, 2025
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 3 days ago –
Tools for package owners.