From 6bd8a6c2cd153bad9ca044b409e55302e10206c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Sat, 2 May 2020 20:53:35 +0200 Subject: Restructure --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 7335e6f..7f31a48 100644 --- a/main.go +++ b/main.go @@ -19,8 +19,8 @@ var debug = flag.Bool("d", false, "enable debug output") var dryRun = flag.Bool("dry-run", false, "do everything short of uploading and writing the cache") var buildCache = flag.Bool("build-cache", false, "only (re)build the cache; useful after migration or when the cache is lost or corrupted") -func processFeed(feed *feed.Feed, cfg *config.Config, client *imap.Client, dryRun bool) { - mails, err := feed.ToMails(cfg) +func processFeed(feed *feed.Feed, client *imap.Client, dryRun bool) { + mails, err := feed.ToMails() if err != nil { log.Errorf("Processing items of feed %s: %s", feed.Name, err) return @@ -103,7 +103,7 @@ func run() error { if !*buildCache { state.ForeachGo(func(f *feed.Feed) { - processFeed(f, cfg, c, *dryRun) + processFeed(f, c, *dryRun) }) } -- cgit v1.2.3