Refactor template render (#36438)

This commit is contained in:
wxiaoguang authored and GitHub committed 2026-01-24 05:11:49 +00:00
1 parent 47717d4435
commit 9de659437e
31 files changed
+475 -459

No files matched your search

@@ -61,6 +61,10 @@ func (t *ScopedTemplate) Freeze() {
t.all.Funcs(m)
}
func (t *ScopedTemplate) HasTemplate(name string) bool {
return t.all.Lookup(name) != nil
}
func (t *ScopedTemplate) Executor(name string, funcMap template.FuncMap) (TemplateExecutor, error) {
t.scopedMu.RLock()
scopedTmplSet, ok := t.scopedTemplateSets[name]