aboutsummaryrefslogtreecommitdiff
path: root/resources.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-04-05 23:24:12 +0800
committerRunxi Yu <me@runxiyu.org>2025-04-05 23:24:12 +0800
commit1fe30eb95bc3219a5c16b90d443f8268cc85456c (patch)
tree8768393ec4cd92ca2d25719ba1acfb4410a1b8a6 /resources.go
parentmisc: Move IterSeqLimit to misc (diff)
downloadforge-1fe30eb95bc3219a5c16b90d443f8268cc85456c.tar.gz
forge-1fe30eb95bc3219a5c16b90d443f8268cc85456c.tar.zst
forge-1fe30eb95bc3219a5c16b90d443f8268cc85456c.zip
Export functions intended to be used in HTML templates
Diffstat (limited to 'resources.go')
-rw-r--r--resources.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/resources.go b/resources.go
index 0f2e1a9..637b8ed 100644
--- a/resources.go
+++ b/resources.go
@@ -32,11 +32,11 @@ func loadTemplates() (err error) {
minifier.Add("text/html", &minifierOptions)
templates = template.New("templates").Funcs(template.FuncMap{
- "first_line": firstLine,
- "path_escape": pathEscape,
- "query_escape": queryEscape,
- "dereference_error": dereferenceOrZero[error],
- "minus": minus,
+ "first_line": FirstLine,
+ "path_escape": PathEscape,
+ "query_escape": QueryEscape,
+ "dereference_error": DereferenceOrZero[error],
+ "minus": Minus,
})
err = fs.WalkDir(embeddedResourcesFS, "templates", func(path string, d fs.DirEntry, err error) error {