From cc5ae1a0a1b1abfb147b74e6583f15a585566cf0 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 5 Apr 2025 23:25:06 +0800 Subject: Move trivial template functions into misc --- resources.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'resources.go') 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 { -- cgit v1.2.3