Versions in this module Expand all Collapse all v0 v0.2.0 Sep 22, 2026 Changes in this version type Builder + func (b *Builder) Block(text string) *Builder + func (b *Builder) ETBPayload(payload string) *Builder + func (b *Builder) Field(value string) *Builder + func (b *Builder) Item(text string) *Builder + func (b *Builder) ListField(items ...string) *Builder + func (b *Builder) Nested(fn func(*Builder)) *Builder + func (b *Builder) Ref(name string) *Builder + func (b *Builder) RefPath(path ...string) *Builder + func (b *Builder) Section(name string, depth int) *Builder type Record + func (r *Record) List(n int) [][]byte v0.1.0 Jun 18, 2026 Changes in this version + const DLE + const ENQ + const EOT + const ETB + const ETX + const FS + const GS + const RS + const SOH + const STX + const SUB + const US + var ErrUnexpectedEnd = errors.New("c0: unexpected end of input after DLE escape") + func Build(fn func(*Builder)) ([]byte, error) + func Canonical(buf []byte) bool + func Format(buf []byte) string + func FormatWith(buf []byte, indent string) string + func Glyph(b byte) rune + func IsAssigned(b byte) bool + func Parse(s string) []byte + func ReadLog(path string) ([]byte, error) + func Unescape(buf []byte) []byte + type Builder struct + func (b *Builder) Bytes() []byte + func (b *Builder) EOT() *Builder + func (b *Builder) ETB() *Builder + func (b *Builder) Err() error + func (b *Builder) File(name string) *Builder + func (b *Builder) Group(name string, headers []string) *Builder + func (b *Builder) Header(names []string) *Builder + func (b *Builder) Record(fields ...string) *Builder + type Document struct + func NewDocument(buf []byte) *Document + func (d *Document) Group(i int) *Group + func (d *Document) GroupByName(name string) *Group + func (d *Document) GroupCount() int + func (d *Document) GroupNames() [][]byte + func (d *Document) Groups() []*Group + func (d *Document) Name() []byte + type FileLog struct + func OpenLog(path string) (*FileLog, error) + func OpenLogSync(path string, sync bool) (*FileLog, error) + func (l *FileLog) Batch(fn func(*Builder)) error + func (l *FileLog) Close() error + func (l *FileLog) Header(names []string) error + func (l *FileLog) Record(fields ...string) error + type Group struct + func (g *Group) HasHeader() bool + func (g *Group) Name() []byte + func (g *Group) Raw() []byte + func (g *Group) Record(i int) *Record + func (g *Group) RecordCount() int + func (g *Group) Table() *Table + type Record struct + func (r *Record) Field(n int) []byte + func (r *Record) FieldCount() int + func (r *Record) Fields() [][]byte + func (r *Record) Raw() []byte + func (r *Record) Value(n int) []byte + func (r *Record) Values() [][]byte + type StreamReader struct + func NewStreamReader(buf []byte) *StreamReader + func (s *StreamReader) Block(i int) []byte + func (s *StreamReader) BlockCount() int + func (s *StreamReader) Blocks() [][]byte + func (s *StreamReader) Committed() []byte + func (s *StreamReader) CommittedEnd() int + func (s *StreamReader) Table() *Table + func (s *StreamReader) Tail() []byte + func (s *StreamReader) Torn() bool + type StreamWriter struct + func NewStreamWriter(w io.Writer) *StreamWriter + func (sw *StreamWriter) Batch(fn func(*Builder)) error + func (sw *StreamWriter) Header(names []string) error + func (sw *StreamWriter) Record(fields ...string) error + type Table struct + func NewTable(buf []byte) *Table + func NewTableAt(buf []byte, offset int) *Table + func (t *Table) Header(i int) []byte + func (t *Table) HeaderCount() int + func (t *Table) Headers() [][]byte + func (t *Table) Name() []byte + func (t *Table) Record(i int) *Record + func (t *Table) RecordCount() int + func (t *Table) Records() []*Record + type Token struct + End int + Start int + Type TokenType + func Tokenize(buf []byte) ([]Token, error) + func (t Token) Value(buf []byte) []byte + type TokenType int + const TokenData + const TokenENQ + const TokenEOT + const TokenETB + const TokenETX + const TokenFS + const TokenGS + const TokenRS + const TokenSOH + const TokenSTX + const TokenSUB + const TokenUS + type Tokenizer struct + func NewTokenizer(buf []byte) *Tokenizer + func (tz *Tokenizer) Next() (tok Token, ok bool, err error) + type UnassignedCodeError struct + Byte byte + Pos int + func (e *UnassignedCodeError) Error() string