Documentation
¶
Overview ¶
Package template applies date-variable substitution to note templates.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
func Apply(content string, ctx TemplateContext, userVars map[string]string) string
Apply substitutes all template variables in content.
Known variables (DATE, WEEKNO, TITLE) are resolved from ctx. Unknown variables are resolved from userVars (may be nil). Unresolvable variables are left as-is.
func UnknownVars ¶
UnknownVars returns the variable names found in content that are not automatically substituted (not DATE/WEEKNO/TITLE). The result is ordered by first appearance and deduplicated.
Types ¶
Click to show internal directories.
Click to hide internal directories.