aboutsummaryrefslogtreecommitdiff
path: root/frontend/renderer.go
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/renderer.go')
-rw-r--r--frontend/renderer.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/frontend/renderer.go b/frontend/renderer.go
index a3aa83d..524c2c8 100644
--- a/frontend/renderer.go
+++ b/frontend/renderer.go
@@ -47,9 +47,16 @@ func New(path string) *Renderer {
47 "html": func(in string) template.HTML { 47 "html": func(in string) template.HTML {
48 return template.HTML(in) 48 return template.HTML(in)
49 }, 49 },
50 "add": func(a, b int) int {
51 return a + b
52 },
53 "sub": func(a, b int) int {
54 return a - b
55 },
50 } 56 }
57
51 r := &Renderer{ 58 r := &Renderer{
52 template.Must(template.ParseGlob(path + "/*")).Funcs(funcMap), 59 template.Must(template.New("").Funcs(funcMap).ParseGlob(path + "/*")),
53 make(map[string]interface{}), 60 make(map[string]interface{}),
54 } 61 }
55 62