From 431a8ddb0c18b0781cba1d01eda3645b361f1b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Sun, 19 Apr 2020 23:46:08 +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 373a491..2ce7943 100644 --- a/main.go +++ b/main.go @@ -6,10 +6,10 @@ import ( "net/url" "os" - "github.com/Necoro/feed2imap-go/internal/config" "github.com/Necoro/feed2imap-go/internal/feed" "github.com/Necoro/feed2imap-go/internal/imap" "github.com/Necoro/feed2imap-go/internal/log" + "github.com/Necoro/feed2imap-go/internal/yaml" ) var cfgFile = flag.String("f", "config.yml", "configuration file") @@ -22,12 +22,12 @@ func run() error { log.Print("Starting up...") log.Printf("Reading configuration file '%s'", *cfgFile) - cfg, err := config.Load(*cfgFile) + cfg, feeds, err := yaml.Load(*cfgFile) if err != nil { return err } - feed.Parse(cfg.Feeds) + feed.Parse(feeds) imapUrl, err := url.Parse(cfg.GlobalConfig["target"].(string)) if err != nil { -- cgit v1.2.3