Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

TOML

TOML marshals any Go value; RawTOML accepts pre-serialized bytes:

clog.Print().TOML(configStruct)
clog.Print().RawTOML(configBytes)

Styling

Token colors are configured via styles:

custom := style.DefaultTOML()
custom.Key = new(lipgloss.NewStyle().Foreground(lipgloss.Color("#50fa7b")))
clog.SetStyles(&style.Config{TOML: custom})
Style fieldTokens
BoolTruetrue
BoolFalsefalse
Comment# text
DateTimedates, times, datetimes
Floatfloating point, inf, nan
Integerintegers, hex, octal, binary
Keybare and dotted keys
Punctuationstructural tokens (=, [, ], {, }, ,)
Stringbasic and literal strings
TableKey[table] and [[array]] header keys