aboutsummaryrefslogtreecommitdiff
path: root/pkg/config/config.go
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-05-25 20:33:06 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-05-25 20:33:06 +0200
commitdae31bb0192e6b519111d3cb80ddd4312cda306c (patch)
tree132f610d3e2d71ec396f6a3cd960ac33aad35df2 /pkg/config/config.go
parent3cbf95d38b6f8bd17b4312371ed07e6847ff0f5c (diff)
downloadfeed2imap-go-dae31bb0192e6b519111d3cb80ddd4312cda306c.tar.gz
feed2imap-go-dae31bb0192e6b519111d3cb80ddd4312cda306c.tar.bz2
feed2imap-go-dae31bb0192e6b519111d3cb80ddd4312cda306c.zip
'Exec' as an alternative to 'Url'
Diffstat (limited to 'pkg/config/config.go')
-rw-r--r--pkg/config/config.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/config/config.go b/pkg/config/config.go
index bd3927c..e98a1aa 100644
--- a/pkg/config/config.go
+++ b/pkg/config/config.go
@@ -83,6 +83,12 @@ func (cfg *Config) Validate() error {
return fmt.Errorf("No target set!")
}
+ for _, feed := range cfg.Feeds {
+ if feed.Url != "" && len(feed.Exec) > 0 {
+ return fmt.Errorf("Feed %s: Both 'Url' and 'Exec' set, unsure what to do.", feed.Name)
+ }
+ }
+
return nil
}