1
0
Fork 0
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:
jvoisin 2025-06-17 17:42:03 +02:00 committed by Frédéric Guillot
parent 81df0b2a16
commit 72486b9bd1

View file

@ -7,6 +7,7 @@ import (
"log/slog"
"net/url"
"regexp"
"slices"
"time"
"github.com/tdewolff/minify/v2"
@ -42,9 +43,7 @@ func ProcessFeedEntries(store *storage.Storage, feed *model.Feed, userID int64,
parsedSiteURL, _ := url.Parse(feed.SiteURL)
// Process older entries first
for i := len(feed.Entries) - 1; i >= 0; i-- {
entry := feed.Entries[i]
for _, entry := range slices.Backward(feed.Entries) {
slog.Debug("Processing entry",
slog.Int64("user_id", user.ID),
slog.String("entry_url", entry.URL),