reverse order

This commit is contained in:
Balakrishnan Balasubramanian 2022-07-14 20:54:00 -04:00
parent 1a77862e4a
commit 44e7d1f1a6

View File

@ -108,7 +108,11 @@ func main() {
Title string Title string
VidoesUrl string VidoesUrl string
Items []db.Item Items []db.Item
}{title, videosUrl, jd.Items} }{title, videosUrl, nil}
//reverse order
for _, item := range jd.Items {
td.Items = append([]db.Item{item}, td.Items...)
}
if err := tmpl.Execute(w, td); err != nil { if err := tmpl.Execute(w, td); err != nil {
log.Panic(err) log.Panic(err)
} }