Documentation
¶
Overview ¶
Package glossary owns glossary records, parsing, and two-layer merge semantics.
Index ¶
Constants ¶
const MeaningMax = 280
MeaningMax bounds a meaning at roughly two sentences of ordinary prose, counted in runes (ADR-0207 decision 9). It is a fixed constant rather than a config key on purpose: an adopter-raisable threshold is a suppressing value, which this project's severity model does not have. The advisory evaluates the merged set, so this bounds the shipped standard vocabulary as well as authored terms (decision 10); the portability test is the additional guard that awf never ships an over-length term in the first place.
const ( // SidecarPath names the authoring surface in every glossary content error. SidecarPath = config.DirName + "/docs/glossary.yaml" )
Variables ¶
This section is empty.
Functions ¶
func SpecializedListDataKeys ¶
SpecializedListDataKeys identifies glossary data that uses identity-aware composition instead of generic same-key catalog-list layering.
Types ¶
type Record ¶
Record is one authored term: the term itself, its meaning, and the optional owning domains. Domains resolve against the project's configured domains in checkGlossary, which this render-time path cannot see.
func Merge ¶
Merge is the single home of the two-layer merge: the standard vocabulary awf ships, overlaid by the project's authored terms. An authored record overrides a shipped record whose term matches case-insensitively, which is the only way to remove an unwanted shipped term. A case-insensitive duplicate WITHIN either layer stays a hard error; a duplicate ACROSS layers is the override. Order is not guaranteed; glossaryRows sorts.
func Records ¶
Records validates one authored layer into its record list. An absent or null value yields nil, nil (the template's else branch renders the placeholder). A non-list value, a non-mapping element, a missing or wrong-typed field, an unknown record key, or a case-insensitive duplicate term within this layer is a hard error. Domain resolution is checkGlossary's job (it needs the project's domains); this validates shape only.