mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
refactor(processor): minor simplification of a loop
This makes the code a tad clearer.
This commit is contained in:
parent
81df0b2a16
commit
72486b9bd1
1 changed files with 2 additions and 3 deletions
|
@ -7,6 +7,7 @@ import (
|
||||||
"log/slog"
|
"log/slog"
|
||||||
"net/url"
|
"net/url"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
"slices"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/tdewolff/minify/v2"
|
"github.com/tdewolff/minify/v2"
|
||||||
|
@ -42,9 +43,7 @@ func ProcessFeedEntries(store *storage.Storage, feed *model.Feed, userID int64,
|
||||||
parsedSiteURL, _ := url.Parse(feed.SiteURL)
|
parsedSiteURL, _ := url.Parse(feed.SiteURL)
|
||||||
|
|
||||||
// Process older entries first
|
// Process older entries first
|
||||||
for i := len(feed.Entries) - 1; i >= 0; i-- {
|
for _, entry := range slices.Backward(feed.Entries) {
|
||||||
entry := feed.Entries[i]
|
|
||||||
|
|
||||||
slog.Debug("Processing entry",
|
slog.Debug("Processing entry",
|
||||||
slog.Int64("user_id", user.ID),
|
slog.Int64("user_id", user.ID),
|
||||||
slog.String("entry_url", entry.URL),
|
slog.String("entry_url", entry.URL),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue