aboutsummaryrefslogtreecommitdiffstats
path: root/render
diff options
context:
space:
mode:
authorAdam Mathes <adam@trenchant.org>2018-02-18 09:24:10 -0800
committerAdam Mathes <adam@trenchant.org>2018-02-18 09:24:10 -0800
commit9989337b3f760267f40bfe67a501eed3de012417 (patch)
tree86b52d4606d1bf8a4c431df329fc59aaad48c1e3 /render
parent1dc63a221695eeacf226e301ec4306e8573e1b79 (diff)
downloadsnkt-9989337b3f760267f40bfe67a501eed3de012417.tar.gz
snkt-9989337b3f760267f40bfe67a501eed3de012417.tar.bz2
snkt-9989337b3f760267f40bfe67a501eed3de012417.zip
watch now also rebuilds on template file changes
Diffstat (limited to 'render')
-rw-r--r--render/render.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/render/render.go b/render/render.go
index ba8e52b..bf53208 100644
--- a/render/render.go
+++ b/render/render.go
@@ -77,7 +77,11 @@ func Init() {
tx := template.New("t").Funcs(tmplFuncs)
templates[tf], err = tx.ParseFiles(base, t)
if err != nil {
- panic(err)
+ // temporary files can confuse this, especially when
+ // running the file system watcher so we silently
+ // ignore any templates that disappeared since we started
+ // since this is usually not a real error condition
+ delete(templates, tf)
}
}
rel_href = regexp.MustCompile(`href="/(.+)"`)