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) } }
func handleIncident(w http.ResponseWriter, r *http.Request) { data := make(map[string]interface{}) data["Page"] = page rendering.RenderTemplate(w, r, "incident", data) }