From e34697cafe9e88964c46e74baa7c6b978a29bdfd Mon Sep 17 00:00:00 2001 From: Ben Morrison Date: Sat, 8 Jun 2019 02:22:58 -0400 Subject: template panic fix --- svc/init.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'svc') diff --git a/svc/init.go b/svc/init.go index b688e5d..79a542a 100644 --- a/svc/init.go +++ b/svc/init.go @@ -1,6 +1,7 @@ package svc // import "github.com/getwtxt/getwtxt/svc" import ( + "html/template" "log" "os" "os/signal" @@ -10,7 +11,7 @@ import ( "github.com/spf13/pflag" ) -const getwtxt = "0.2.3" +const getwtxt = "0.2.4" var ( flagVersion *bool = pflag.BoolP("version", "v", false, "Display version information, then exit.") @@ -31,7 +32,7 @@ var closeLog = make(chan bool, 1) // initialization var dbChan = make(chan dbase, 1) -var tmpls = initTemplates() +var tmpls *template.Template var twtxtCache = registry.NewIndex() @@ -61,6 +62,7 @@ func initSvc() { initLogging() initDatabase() go cacheAndPush() + tmpls = initTemplates() watchForInterrupt() } -- cgit 1.4.1-2-gfad0