aboutsummaryrefslogtreecommitdiff
path: root/echo/echo_default.go
diff options
context:
space:
mode:
Diffstat (limited to 'echo/echo_default.go')
-rw-r--r--echo/echo_default.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/echo/echo_default.go b/echo/echo_default.go
index cbe43cb..8440fe2 100644
--- a/echo/echo_default.go
+++ b/echo/echo_default.go
@@ -61,6 +61,7 @@ type EchoConfig struct {
61 TrustedProxyIPRanges []string 61 TrustedProxyIPRanges []string
62 EmbeddedTemplates fs.FS 62 EmbeddedTemplates fs.FS
63 DiskTemplates fs.FS 63 DiskTemplates fs.FS
64 ProvideTemplateStore []WantsTemplateStore
64 TemplateFunctions template.FuncMap 65 TemplateFunctions template.FuncMap
65 CombinedHostLogFile string 66 CombinedHostLogFile string
66 RedirectToWWW bool 67 RedirectToWWW bool
@@ -227,6 +228,11 @@ func (w *EchoWrapper) configureTemplates(c *EchoConfig) error {
227 templates = c.EmbeddedTemplates 228 templates = c.EmbeddedTemplates
228 } 229 }
229 230
231 // Configure plugins that want access to the template store
232 for _, w := range c.ProvideTemplateStore {
233 w.ConfigureTemplateStore(templates)
234 }
235
230 // Only install template handlers if the path is set 236 // Only install template handlers if the path is set
231 if templates != nil { 237 if templates != nil {
232 tr, err := NewTemplateRenderer(templates, "*.tpl", c.TemplateFunctions, w.Debug) 238 tr, err := NewTemplateRenderer(templates, "*.tpl", c.TemplateFunctions, w.Debug)