Template execution rework

This commit is contained in:
binwiederhier
2026-07-08 21:08:07 +02:00
parent 7b54850c16
commit a001ac5195
20 changed files with 2795 additions and 48 deletions
+3 -3
View File
@@ -5,7 +5,6 @@ import (
"path/filepath"
"reflect"
"strings"
"text/template"
"time"
)
@@ -21,8 +20,9 @@ const (
//
// tpl := template.New("foo").Funcs(sprig.FuncMap()))
//
// TxtFuncMap returns a 'text/template'.FuncMap
func TxtFuncMap() template.FuncMap {
// TxtFuncMap returns the function map as a plain map[string]any, assignable to any text/template or
// html/template FuncMap (including ntfy's vendored internal/template).
func TxtFuncMap() map[string]any {
return map[string]any{
// Date functions
"ago": dateAgo,