summary refs log tree commit diff stats
path: root/cache.go
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-05-23 02:32:01 -0400
committerBen Morrison <ben@gbmor.dev>2019-05-23 02:32:01 -0400
commitf316396ab1f6792e52ad4533397c07845d90eb07 (patch)
tree604334255efaad44795b9f49464b11e42451b5e8 /cache.go
parent25972a6bfa296f37a4f658b2b848705fbaaf3bbd (diff)
downloadgetwtxt-f316396ab1f6792e52ad4533397c07845d90eb07.tar.gz
reusing template init func for recache
Diffstat (limited to 'cache.go')
-rw-r--r--cache.go8
1 files 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)