diff options
author | Ben Morrison <ben@gbmor.dev> | 2019-05-23 02:32:01 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2019-05-23 02:32:01 -0400 |
commit | f316396ab1f6792e52ad4533397c07845d90eb07 (patch) | |
tree | 604334255efaad44795b9f49464b11e42451b5e8 /cache.go | |
parent | 25972a6bfa296f37a4f658b2b848705fbaaf3bbd (diff) | |
download | getwtxt-f316396ab1f6792e52ad4533397c07845d90eb07.tar.gz |
reusing template init func for recache
Diffstat (limited to 'cache.go')
-rw-r--r-- | cache.go | 8 |
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) |