Documentation
¶
Overview ¶
Package structured is the structured tier (docs/SPEC.md §10): extractors that parse a format instead of reading it line by line, so a def binds to a node's exact extent. It lives outside the root module because it depends on format parsers; the root's config tier keeps working without it, in line mode.
YAML is the first format. A directive on a key's line binds that key's entry: a scalar (including a multi-line block scalar) as its value, a mapping or sequence as its whole extent. A directive on its own line binds the next entry. Register it ahead of the built-in tiers:
docsync.New(docsync.WithExtractor(structured.YAML()))
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrHCL = errors.New("structured: hcl parse failed; fell back to line mode")
ErrHCL wraps a parse failure; the file then falls back to the heuristic code tier so no directive is lost.
var ErrHCLPick = errors.New("structured: hcl pick path not found")
ErrHCLPick is returned when the path names nothing in the file.
var ErrTOML = errors.New("structured: toml parse failed; fell back to line mode")
ErrTOML wraps a parse failure; the file then falls back to the line-mode config tier so no directive is lost.
var ErrYAML = errors.New("structured: yaml parse failed; fell back to line mode")
ErrYAML wraps a parse failure; the file then falls back to the line-mode config tier so no directive is lost.
Functions ¶
Types ¶
This section is empty.