Beispiel #1
0
func handleIndex() func(w http.ResponseWriter, r *http.Request) {
	return func(w http.ResponseWriter, r *http.Request) {
		data := make(map[string]interface{})
		data["Incidents"] = db.GetAllIncidents()
		rendering.RenderTemplate(w, r, "index", data)
	}
}
Beispiel #2
0
func handleIncident(w http.ResponseWriter, r *http.Request) {
	data := make(map[string]interface{})
	data["Page"] = page
	rendering.RenderTemplate(w, r, "incident", data)
}