diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-05-25 20:33:06 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-05-25 20:33:06 +0200 |
commit | dae31bb0192e6b519111d3cb80ddd4312cda306c (patch) | |
tree | 132f610d3e2d71ec396f6a3cd960ac33aad35df2 /pkg/config/config.go | |
parent | 3cbf95d38b6f8bd17b4312371ed07e6847ff0f5c (diff) | |
download | feed2imap-go-dae31bb0192e6b519111d3cb80ddd4312cda306c.tar.gz feed2imap-go-dae31bb0192e6b519111d3cb80ddd4312cda306c.tar.bz2 feed2imap-go-dae31bb0192e6b519111d3cb80ddd4312cda306c.zip |
'Exec' as an alternative to 'Url'
Diffstat (limited to '')
-rw-r--r-- | pkg/config/config.go | 6 |
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 } |