package buffer
import "log/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) error
- func (b *Buffer) WritePosInt(i int)
- func (b *Buffer) WritePosIntWidth(i, width int)
- func (b *Buffer) WriteString(s string) (int, error)
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 ¶
- Version
- v1.21.1
- Published
- Aug 31, 2023
- Platform
- js/wasm
- Imports
- 1 packages
- Last checked
- 1 minute ago –
Tools for package owners.