mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-08 14:03:24 +09:00
Refactor template render (#36438)
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user