reverse order
This commit is contained in:
parent
1a77862e4a
commit
44e7d1f1a6
6
main.go
6
main.go
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user