aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/main.go b/main.go
index 2ce7943..7e6d560 100644
--- a/main.go
+++ b/main.go
@@ -27,9 +27,13 @@ func run() error {
return err
}
+ if err = cfg.Validate(); err != nil {
+ return fmt.Errorf("Configuration invalid: %w", err)
+ }
+
feed.Parse(feeds)
- imapUrl, err := url.Parse(cfg.GlobalConfig["target"].(string))
+ imapUrl, err := url.Parse(cfg.Target)
if err != nil {
return fmt.Errorf("parsing 'target': %w", err)
}