From 46f089fcfc7b2f9b5d7c1000a074de54be37c1f2 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 25 Nov 2024 22:54:51 +0100 Subject: Use TrimSuffix() instead of CutSuffix() --- src/templates.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/templates.go') diff --git a/src/templates.go b/src/templates.go index 5a4d7c5..258a133 100644 --- a/src/templates.go +++ b/src/templates.go @@ -41,7 +41,7 @@ func init() { templates = make(map[string]*template.Template, len(ents)) for _, e := range ents { path := "/" - name, _ := strings.CutSuffix(e.Name(), ".html.tmpl") + name := strings.TrimSuffix(e.Name(), ".html.tmpl") switch { case name[0] == '-': continue -- cgit v1.2.3