Documentation ¶
Index ¶
- Constants
- func Decode(r io.Reader, v interface{}) error
- func DecodeFile(file string, v interface{}) error
- func Dump(n Node)
- type Array
- type FormatRule
- 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
- type Literal
- type Node
- type Option
- type Parser
- type Position
- type ScanFunc
- type Scanner
- type Table
- type Token
Constants ¶
View Source
const ( TokEOF rune = -(iota) + 1 TokNL TokIdent TokString TokBasic TokLiteral TokBasicMulti TokLiteralMulti TokInteger TokFloat TokBool TokDate TokDatetime TokTime TokComment TokIllegal TokBegArray TokEndArray TokBegInline TokEndInline TokBegRegularTable TokEndRegularTable TokBegArrayTable TokEndArrayTable TokEqual TokDot TokComma TokNewline )
Variables ¶
This section is empty.
Functions ¶
func DecodeFile ¶
Types ¶
type FormatRule ¶
func WithArray ¶
func WithArray(format string) FormatRule
func WithComment ¶
func WithComment(with bool) FormatRule
func WithEOL ¶
func WithEOL(format string) FormatRule
func WithEmpty ¶
func WithEmpty(with bool) FormatRule
func WithFloat ¶
func WithFloat(format string, underscore int) FormatRule
func WithInline ¶
func WithInline(inline bool) FormatRule
func WithNest ¶
func WithNest(with bool) FormatRule
func WithNumber ¶
func WithNumber(format string, underscore int) FormatRule
func WithRaw ¶
func WithRaw(with bool) FormatRule
func WithTab ¶
func WithTab(tab int) FormatRule
func WithTime ¶
func WithTime(millis int, utc bool) FormatRule
type Formatter ¶
type Formatter struct {
// contains filtered or unexported fields
}
func NewFormatter ¶
func NewFormatter(doc string, rules ...FormatRule) (*Formatter, error)
Click to show internal directories.
Click to hide internal directories.