aboutsummaryrefslogtreecommitdiff
path: root/main.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 /main.go
parented1e06e6d81645fb5fedd89018c30f95b7598f84 (diff)
downloadfeed2imap-go-431a8ddb0c18b0781cba1d01eda3645b361f1b94.tar.gz
feed2imap-go-431a8ddb0c18b0781cba1d01eda3645b361f1b94.tar.bz2
feed2imap-go-431a8ddb0c18b0781cba1d01eda3645b361f1b94.zip
Restructure
Diffstat (limited to '')
-rw-r--r--main.go6
1 files changed, 3 insertions, 3 deletions
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 {