summaryrefslogtreecommitdiff
path: root/internal/feed/parse.go
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-19 23:46:08 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-19 23:46:08 +0200
commit431a8ddb0c18b0781cba1d01eda3645b361f1b94 (patch)
treef67e427279e4e50d20c6acfa8ad22b51f2b5f7e6 /internal/feed/parse.go
parented1e06e6d81645fb5fedd89018c30f95b7598f84 (diff)
downloadfeed2imap-go-431a8ddb0c18b0781cba1d01eda3645b361f1b94.tar.gz
feed2imap-go-431a8ddb0c18b0781cba1d01eda3645b361f1b94.tar.bz2
feed2imap-go-431a8ddb0c18b0781cba1d01eda3645b361f1b94.zip
Restructure
Diffstat (limited to '')
-rw-r--r--internal/feed/parse.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/feed/parse.go b/internal/feed/parse.go
index 53ceb00..a38be92 100644
--- a/internal/feed/parse.go
+++ b/internal/feed/parse.go
@@ -8,7 +8,6 @@ import (
"github.com/mmcdole/gofeed"
- "github.com/Necoro/feed2imap-go/internal/config"
"github.com/Necoro/feed2imap-go/internal/log"
)
@@ -16,7 +15,7 @@ func context() (ctxt.Context, ctxt.CancelFunc) {
return ctxt.WithTimeout(ctxt.Background(), 60*time.Second)
}
-func parseFeed(feed *config.Feed) error {
+func parseFeed(feed *Feed) error {
ctx, cancel := context()
defer cancel()
fp := gofeed.NewParser()
@@ -27,7 +26,7 @@ func parseFeed(feed *config.Feed) error {
return nil
}
-func handleFeed(feed *config.Feed, wg *sync.WaitGroup) {
+func handleFeed(feed *Feed, wg *sync.WaitGroup) {
defer wg.Done()
log.Printf("Fetching %s from %s", feed.Name, feed.Url)
@@ -36,7 +35,7 @@ func handleFeed(feed *config.Feed, wg *sync.WaitGroup) {
}
}
-func Parse(feeds config.Feeds) {
+func Parse(feeds Feeds) {
var wg sync.WaitGroup
wg.Add(len(feeds))