From f316396ab1f6792e52ad4533397c07845d90eb07 Mon Sep 17 00:00:00 2001 From: Ben Morrison Date: Thu, 23 May 2019 02:32:01 -0400 Subject: reusing template init func for recache --- cache.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cache.go b/cache.go index d598d19..6496775 100644 --- a/cache.go +++ b/cache.go @@ -2,7 +2,6 @@ package main import ( "bytes" - "html/template" "io/ioutil" "log" "net" @@ -209,11 +208,8 @@ func pingAssets() { cssMod := staticCache.cssMod if !indexMod.Equal(indexStat.ModTime()) { - var err error - tmpls, err = template.ParseFiles("assets/tmpl/index.html") - if err != nil { - log.Printf("%v\n", err) - } + tmpls = initTemplates() + var b []byte buf := bytes.NewBuffer(b) -- cgit 1.4.1-2-gfad0