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"
|
||||
"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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue