mirror of
https://salsa.debian.org/mdosch/feed-to-muc.git
synced 2024-12-22 12:55:23 +01:00
Use range for loop.
This commit is contained in:
parent
4708bd326e
commit
7dfe7115e1
1 changed files with 2 additions and 2 deletions
4
main.go
4
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)
|
||||
|
|
Loading…
Reference in a new issue