templates/template_end.go

12 lines
302 B
Go
Raw Permalink Normal View History

2025-01-12 10:47:45 +00:00
package templates
import "net/http"
func (T Templates) TemplateEnd(template_name string, w http.ResponseWriter, r *http.Request, v any) {
w.Header().Set("Content-Type", "text/html")
err := T[template_name].ExecuteTemplate(w, template_name, v)
if err != nil {
T.ReplTemplateIssue(err, w, r)
}
}