From 7a6f71ac73b41a38e9982bea3d46a87c327bd77a Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 22 Mar 2025 13:17:55 +0800 Subject: Initial linting --- resources.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'resources.go') diff --git a/resources.go b/resources.go index fb67102..dcfc2a5 100644 --- a/resources.go +++ b/resources.go @@ -37,14 +37,15 @@ var templates *template.Template func loadTemplates() (err error) { m := minify.New() - m.Add("text/html", &html.Minifier{TemplateDelims: [2]string{"{{", "}}"}, KeepDefaultAttrVals: true}) + minifier := html.Minifier{TemplateDelims: [2]string{"{{", "}}"}, KeepDefaultAttrVals: true} //exhaustruct:ignore + m.Add("text/html", &minifier) templates = template.New("templates").Funcs(template.FuncMap{ "first_line": firstLine, "base_name": baseName, "path_escape": pathEscape, "query_escape": queryEscape, - "dereference_error": dereference_or_zero[error], + "dereference_error": dereferenceOrZero[error], }) err = fs.WalkDir(resourcesFS, "templates", func(path string, d fs.DirEntry, err error) error { -- cgit v1.2.3