Skip to content

Commit

Permalink
Add stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
jafarlihi committed Nov 19, 2022
1 parent 48fbdc1 commit 1b53e3c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions feed.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package main

import (
"strconv"

log "github.com/sirupsen/logrus"
)

Expand All @@ -9,10 +11,13 @@ type Feed struct {
Address string
}

func UpdateAllFeeds() {
log.Info("All feeds updated")
func UpdateFeed(feed string) {
log.Info("Updating feed '" + feed + "'")
log.Info(strconv.Itoa(1) + " articles fetched from feed '" + feed + "'")
}

func UpdateFeed(feed string) {
log.Info(feed + " updated")
func UpdateAllFeeds() {
for _, feed := range Config.Feeds {
UpdateFeed(feed.Name)
}
}

0 comments on commit 1b53e3c

Please sign in to comment.