diff options
author | Runxi Yu <me@runxiyu.org> | 2025-04-05 23:25:06 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-04-05 23:25:06 +0800 |
commit | cc5ae1a0a1b1abfb147b74e6583f15a585566cf0 (patch) | |
tree | d12ebaf7964b631ad06fd53a21e0d6c3d1480387 /resources.go | |
parent | Export functions intended to be used in HTML templates (diff) | |
download | forge-cc5ae1a0a1b1abfb147b74e6583f15a585566cf0.tar.gz forge-cc5ae1a0a1b1abfb147b74e6583f15a585566cf0.tar.zst forge-cc5ae1a0a1b1abfb147b74e6583f15a585566cf0.zip |
Move trivial template functions into misc
Diffstat (limited to 'resources.go')
-rw-r--r-- | resources.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/resources.go b/resources.go index 637b8ed..e2168a3 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": misc.FirstLine, + "path_escape": misc.PathEscape, + "query_escape": misc.QueryEscape, + "dereference_error": misc.DereferenceOrZero[error], + "minus": misc.Minus, }) err = fs.WalkDir(embeddedResourcesFS, "templates", func(path string, d fs.DirEntry, err error) error { |