From e0f9679694104a820dbf8d358907d77d1ae7740d Mon Sep 17 00:00:00 2001 From: Adhityaa Date: Sun, 3 Jun 2018 14:03:45 +0530 Subject: [PATCH] router_static.go: use different template delims Vue.js uses the same template system {{variable}}, and that clashes with Go's default delimiters for templates. --- api/router_static.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/router_static.go b/api/router_static.go index 33a6eec..21d2198 100644 --- a/api/router_static.go +++ b/api/router_static.go @@ -45,7 +45,7 @@ func initStaticRouter(router *mux.Router) error { return err } - t, err := template.New(page).Parse(string(contents)) + t, err := template.New(page).Delims("<<<", ">>>").Parse(string(contents)) if err != nil { logger.Errorf("cannot parse %s.html template: %v", page, err) return err