Documentation
¶
Overview ¶
Package tmpl provides template rendering utilities for shell commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ScriptPaths map[string]string // "hive-tmux" -> "/path/to/bin/hive-tmux"
AgentCommand string // default profile command (e.g., "claude")
AgentWindow string // default profile key / tmux window name
AgentFlags string // shell-quoted flags string
}
Config holds all template rendering context.
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer renders Go templates with shell-oriented helper functions.
func NewValidation ¶
func NewValidation() *Renderer
NewValidation creates a Renderer with safe defaults for template syntax checking. Template functions return placeholder values — output is discarded, only parse errors matter.
func (*Renderer) ValidateSyntax ¶ added in v0.55.0
ValidateSyntax parses tmpl without executing it. Use this instead of Render when the template's data shape includes dynamic map fields (e.g. map[string]any) whose keys can't be known at validation time — executing with missingkey=error would reject valid templates referencing keys that only exist at render time.