Documentation
¶
Overview ¶
Package bfr provides a writer and printer interface and pool of bytes.Buffer.
Index ¶
- func Get() *bytes.Buffer
- func Grow(b Writer, n int)
- func JSON(p Printer) (res []byte, err error)
- func Put(b *bytes.Buffer)
- func String(p Printer) string
- type P
- func (p *P) Break() bool
- func (p *P) Byte(b byte) (err error)
- func (p *P) Dedent() bool
- func (p *P) Fmt(f string, args ...interface{}) (err error)
- func (p *P) Indent() bool
- func (p *P) Quote(v string) (err error)
- func (p *P) RecordKey(key string) error
- func (p *P) RecordKeyTag(key string, tag byte) (err error)
- func (p *P) Sep() error
- type Printer
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Grow ¶
Grow grows the buffer by n if it implements a Grow(int) method. Both bytes.Buffer and strings.Builder implement that method.
Types ¶
type P ¶
P is serialization context with output configuration flags for printers
func (*P) Quote ¶
Quote writes v as quoted string to the buffer or returns an error. The quote used depends on the json context flag.
Click to show internal directories.
Click to hide internal directories.