aboutsummaryrefslogblamecommitdiff
path: root/http_template.go
blob: d135c715a41e695d5b96252567c75c9774e0008d (plain) (tree)
1
2
3
4
5
6
7
8
9
10








                                                                                                       
package main

import "net/http"

func render_template(w http.ResponseWriter, template_name string, params map[string]any) {
	err := templates.ExecuteTemplate(w, template_name, params)
	if err != nil {
		http.Error(w, "Error rendering template: "+err.Error(), http.StatusInternalServerError)
	}
}