Versions in this module Expand all Collapse all v1 v1.0.5 Sep 27, 2021 v1.0.4 Sep 27, 2021 Changes in this version + var ErrUndefined = errors.New("undefined") v1.0.3 Jul 23, 2021 v1.0.2 Jul 20, 2021 v1.0.1 Dec 9, 2020 Changes in this version + type Setter interface + Set func(string) error v1.0.0 Oct 23, 2020 Changes in this version + const TokBasic + const TokBasicMulti + const TokBegArray + const TokBegArrayTable + const TokBegInline + const TokBegRegularTable + const TokBool + const TokComma + const TokComment + const TokDate + const TokDatetime + const TokDot + const TokEOF + const TokEndArray + const TokEndArrayTable + const TokEndInline + const TokEndRegularTable + const TokEqual + const TokFloat + const TokIdent + const TokIllegal + const TokInteger + const TokLiteral + const TokLiteralMulti + const TokNL + const TokNewline + const TokString + const TokTime + func Decode(r io.Reader, v interface{}) error + func DecodeFile(file string, v interface{}) error + func Dump(n Node) + type Array struct + func (a *Array) Append(n Node) + func (a *Array) Pos() Position + func (a *Array) String() string + type FormatRule func(*Formatter) error + func WithArray(format string) FormatRule + func WithComment(with bool) FormatRule + func WithEOL(format string) FormatRule + func WithEmpty(with bool) FormatRule + func WithFloat(format string, underscore int) FormatRule + func WithInline(inline bool) FormatRule + func WithNest(with bool) FormatRule + func WithNumber(format string, underscore int) FormatRule + func WithRaw(with bool) FormatRule + func WithTab(tab int) FormatRule + func WithTime(millis int, utc bool) FormatRule + type Formatter struct + func NewFormatter(doc string, rules ...FormatRule) (*Formatter, error) + func (f *Formatter) Format(w io.Writer) error + type Literal struct + func (i *Literal) Pos() Position + func (i *Literal) String() string + type Node interface + Pos func() Position + func Parse(r io.Reader) (Node, error) + type Option struct + func (o *Option) Pos() Position + func (o *Option) String() string + type Parser struct + func (p *Parser) Parse() (Node, error) + type Position struct + Column int + Line int + func (p Position) IsValid() bool + func (p Position) IsZero() bool + func (p Position) Less(other Position) bool + func (p Position) String() string + type ScanFunc func(*Scanner) ScanFunc + type Scanner struct + func NewScanner(r io.Reader) (*Scanner, error) + func (s *Scanner) Scan() Token + type Table struct + func (t *Table) Pos() Position + func (t *Table) String() string + type Token struct + Literal string + Pos Position + Raw string + Type rune + func (t Token) IsIdent() bool + func (t Token) IsNumber() bool + func (t Token) IsTime() bool + func (t Token) IsValid() bool + func (t Token) String() string