func settingsHandler(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, xml.Header) ismobile := utils.IsMobile(r.Header) xmlheader, err := buildXMLHeader("settings", ismobile) utils.Checkerr(err) fmt.Fprintf(w, "%s", xmlheader) enc := xml.NewEncoder(w) p := buildBasicPage() enc.Encode(p) }
func latestHandler(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, xml.Header) ismobile := utils.IsMobile(r.Header) xmlheader, err := buildXMLHeader("feed", ismobile) utils.Checkerr(err) fmt.Fprintf(w, "%s", xmlheader) enc := xml.NewEncoder(w) var p Page nav := buildNavigation() p.Navigation = nav c, _ := cache.Get("all") content := Content{Title: "Latest", Entries: c.Entries} p.Content = content enc.Encode(p) }