diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-04-20 18:45:43 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-04-20 18:45:43 +0200 |
commit | afe2c4919dc2ded2f3b7d796b914dd66fbe78e64 (patch) | |
tree | febdd45c23807fa1e9c22078b7927cd39956f308 /main.go | |
parent | 47fa4464d7cf028dd871d48bf6472d97f60b4a79 (diff) | |
download | feed2imap-go-afe2c4919dc2ded2f3b7d796b914dd66fbe78e64.tar.gz feed2imap-go-afe2c4919dc2ded2f3b7d796b914dd66fbe78e64.tar.bz2 feed2imap-go-afe2c4919dc2ded2f3b7d796b914dd66fbe78e64.zip |
Fixes and validation
Diffstat (limited to '')
-rw-r--r-- | main.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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) } |