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

YAML

YAML marshals any Go value; RawYAML accepts pre-serialized bytes:

clog.Print().YAML(configStruct)
clog.Print().RawYAML(responseBody)

Styling

Token colors are configured via styles:

custom := style.DefaultYAML()
custom.Key = new(lipgloss.NewStyle().Foreground(lipgloss.Color("#50fa7b")))
clog.SetStyles(&style.Config{YAML: custom})
Style fieldTokens
Anchor&name
Alias*name
BoolTruetrue, yes, on
BoolFalsefalse, no, off
Comment# text
Keymapping keys
Nullnull, ~
Numberintegers, floats, hex, octal, binary, inf, nan
Punctuationstructural tokens (:, -, [, ], {, }, ,)
Stringplain, single-quoted, double-quoted string values
Tag!!str, !!int, !custom