go-html/context.go
Claude d7bb0b2b2c
feat: scaffold go-html module with Node interface
Introduces the go-html module with a Node rendering interface, Raw and El
constructors, void element handling, and attribute escaping. Includes a
minimal Context stub and tests for all node types.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 23:34:27 +00:00

15 lines
308 B
Go

package html
// Context carries rendering state through the node tree.
type Context struct {
Identity string
Locale string
Data map[string]any
}
// NewContext creates a new rendering context with sensible defaults.
func NewContext() *Context {
return &Context{
Data: make(map[string]any),
}
}