aboutsummaryrefslogtreecommitdiff
path: root/pkg/config/yaml.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/yaml.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/yaml.go')
-rw-r--r--pkg/config/yaml.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/config/yaml.go b/pkg/config/yaml.go
index 853fb96..85b6bd0 100644
--- a/pkg/config/yaml.go
+++ b/pkg/config/yaml.go
@@ -32,6 +32,7 @@ type group struct {
type feed struct {
Name string
Url string
+ Exec []string
}
type configGroupFeed struct {
@@ -46,7 +47,7 @@ func (grpFeed *configGroupFeed) isGroup() bool {
}
func (grpFeed *configGroupFeed) isFeed() bool {
- return grpFeed.Feed.Name != "" || grpFeed.Feed.Url != ""
+ return grpFeed.Feed.Name != "" || grpFeed.Feed.Url != "" || len(grpFeed.Feed.Exec) > 0
}
func (grpFeed *configGroupFeed) target() string {
@@ -211,6 +212,7 @@ func buildFeeds(cfg []configGroupFeed, target []string, feeds Feeds, globalFeedO
feeds[name] = &Feed{
Name: name,
Url: f.Feed.Url,
+ Exec: f.Feed.Exec,
Options: opt,
Target: target,
}