go-html/render.go
Virgil c84bd21cf4
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
docs: align html API comments with AX guidance
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 17:23:37 +00:00

13 lines
307 B
Go

package html
// render.go: Render is a convenience function that renders a node tree to HTML.
// Example: Render(NewLayout("C").C(Raw("body")), NewContext()).
func Render(node Node, ctx *Context) string {
if ctx == nil {
ctx = NewContext()
}
if node == nil {
return ""
}
return node.Render(ctx)
}