From 44e7d1f1a6729fa234cbe43041a5e58b2d898983 Mon Sep 17 00:00:00 2001 From: balki <3070606-balki@users.noreply.gitlab.com> Date: Thu, 14 Jul 2022 20:54:00 -0400 Subject: [PATCH] reverse order --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 564f294..c0d49b7 100644 --- a/main.go +++ b/main.go @@ -108,7 +108,11 @@ func main() { Title string VidoesUrl string 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 { log.Panic(err) }