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