Use xml marshaling to create the rss feed

This commit is contained in:
Las Zenow 2020-04-11 16:54:32 +00:00
parent 04c452853a
commit 0637cb7602
7 changed files with 159 additions and 82 deletions

View file

@ -35,7 +35,7 @@ func (h handler) load(tmpl string, data interface{}) {
fmt := h.r.FormValue("fmt")
switch fmt {
case "rss":
err = h.template.rss.ExecuteTemplate(h.w, tmpl+".rss", data)
err = loadRss(h.w, tmpl, data)
case "opds":
err = h.template.opds.ExecuteTemplate(h.w, tmpl+".opds", data)
case "json":