Get the date for <updated> from the newest entry
This commit is contained in:
parent
c1cac50095
commit
672c6e67ec
2
main.go
2
main.go
|
@ -330,7 +330,7 @@ func main() {
|
||||||
if len(aw.Items) == 0 {
|
if len(aw.Items) == 0 {
|
||||||
feed.Updated = time.Now().Format(time.RFC3339)
|
feed.Updated = time.Now().Format(time.RFC3339)
|
||||||
} else {
|
} else {
|
||||||
feed.Updated = aw.Items[0].Date.Format(time.RFC3339)
|
feed.Updated = aw.Items[len(aw.Items) - 1].Date.Format(time.RFC3339)
|
||||||
}
|
}
|
||||||
for i := len(aw.Items); i != 0; i-- {
|
for i := len(aw.Items); i != 0; i-- {
|
||||||
item := aw.Items[i - 1]
|
item := aw.Items[i - 1]
|
||||||
|
|
Loading…
Reference in New Issue