1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-11-29 11:50:22 +01:00
This commit is contained in:
binwiederhier 2025-07-13 12:45:00 +02:00
parent 3ac3e2ec7c
commit 2a468493f9
16 changed files with 174 additions and 216 deletions

View file

@ -43,7 +43,7 @@ func runt(tpl, expect string) error {
// runtv takes a template, and expected return, and values for substitution.
//
// It runs the template and verifies that the output is an exact match.
func runtv(tpl, expect string, vars interface{}) error {
func runtv(tpl, expect string, vars any) error {
fmap := TxtFuncMap()
t := template.Must(template.New("test").Funcs(fmap).Parse(tpl))
var b bytes.Buffer
@ -58,7 +58,7 @@ func runtv(tpl, expect string, vars interface{}) error {
}
// runRaw runs a template with the given variables and returns the result.
func runRaw(tpl string, vars interface{}) (string, error) {
func runRaw(tpl string, vars any) (string, error) {
fmap := TxtFuncMap()
t := template.Must(template.New("test").Funcs(fmap).Parse(tpl))
var b bytes.Buffer