Documentation
¶
Overview ¶
Package render parses awf section markers and renders templates with per-project overlays via text/template.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Assemble ¶
func Assemble(segs []Segment, plan map[string]SectionPlan) string
Assemble applies the per-section plan to the parsed segments and returns the final template source: literal segments verbatim; each non-dropped section prefixed with its awf:edit pointer, then its part body or the template default. Section markers are consumed here and never written, so they cannot leak. invariant: no-section-marker-leak
func Execute ¶
Execute runs text/template over an already-assembled source with the given data under missingkey=zero.
func ReferencedVars ¶
ReferencedVars returns the sorted, de-duplicated list of variable names referenced via {{ .vars.X }} patterns in src.
Types ¶
type SectionPlan ¶
SectionPlan is the project layer's per-section resolution handed to Assemble. Exactly one of Drop / HasPart / (neither) holds: Drop omits the section, HasPart substitutes PartBody, neither renders the template default. EditPath is the project-relative convention part path named by the awf:edit pointer.