From 7dfe7115e19eea0f97b8f6f4703db6f91f5d3a4c Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Sat, 30 Nov 2024 10:14:48 +0100 Subject: [PATCH] Use range for loop. --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index e3c72d7..6bbd3dd 100644 --- a/main.go +++ b/main.go @@ -84,8 +84,8 @@ func main() { for { // Check all configured feeds for new articles and send // new articles to configured MUC. - for i := 0; i < len(config.Feeds); i++ { - output, err := getArticles(config.Feeds[i], config.MaxArticles, config.NoExcerpt, config.Filter, config.FilterMessage) + for _, confFeed := range config.Feeds { + output, err := getArticles(confFeed, config.MaxArticles, config.NoExcerpt, config.Filter, config.FilterMessage) if err != nil { // Exit if an error occurs checking the feeds. log.Fatal("Error: Can't check feeds for new articles: ", err)