Files
podstalk/handler/template.go
T
jbrechtel 68c1f38b8d
Build and Deploy / build-and-deploy (push) Failing after 36s
Initial commit
2026-07-07 21:58:39 -04:00

19 lines
312 B
Go

package handler
import (
"html/template"
"io"
)
type Templates struct {
tmpl *template.Template
}
func NewTemplates(tmpl *template.Template) *Templates {
return &Templates{tmpl: tmpl}
}
func (t *Templates) Render(w io.Writer, name string, data any) {
_ = t.tmpl.ExecuteTemplate(w, name+".html", data)
}