templates/template_end.go
2025-01-12 03:47:45 -07:00

11 lines
302 B
Go

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)
}
}