11 lines
302 B
Go
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)
|
|
}
|
|
}
|