aboutsummaryrefslogtreecommitdiff
path: root/resources.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-03-21 16:55:53 +0800
committerRunxi Yu <me@runxiyu.org>2025-03-21 16:56:51 +0800
commit44626e60bf2bac53e2e3988874d310e7882eaabf (patch)
tree6e5e096fc6d568fb1c330e78508cef952e8c0d1a /resources.go
parentBump Go version to 1.24.1 (diff)
downloadforge-44626e60bf2bac53e2e3988874d310e7882eaabf.tar.gz
forge-44626e60bf2bac53e2e3988874d310e7882eaabf.tar.zst
forge-44626e60bf2bac53e2e3988874d310e7882eaabf.zip
Output git logs incrementally
Diffstat (limited to 'resources.go')
-rw-r--r--resources.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/resources.go b/resources.go
index c1b4a9b..2576c12 100644
--- a/resources.go
+++ b/resources.go
@@ -40,10 +40,11 @@ func loadTemplates() (err error) {
m.Add("text/html", &html.Minifier{TemplateDelims: [2]string{"{{", "}}"}, KeepDefaultAttrVals: true})
templates = template.New("templates").Funcs(template.FuncMap{
- "first_line": firstLine,
- "base_name": baseName,
- "path_escape": pathEscape,
- "query_escape": queryEscape,
+ "first_line": firstLine,
+ "base_name": baseName,
+ "path_escape": pathEscape,
+ "query_escape": queryEscape,
+ "dereference_error": dereference[error],
})
err = fs.WalkDir(resourcesFS, "templates", func(path string, d fs.DirEntry, err error) error {