aboutsummaryrefslogtreecommitdiff
path: root/pkg/config/yaml.go
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-25 17:37:42 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-25 17:37:42 +0200
commit8c134b0ece0da2d774e2bad4df35803d3c30f500 (patch)
tree1f60b14b0f01fd95401b9fe4aca4ca257602ef1c /pkg/config/yaml.go
parent96725ec63e12e76d6d93345d35d42b141180f4e1 (diff)
downloadfeed2imap-go-8c134b0ece0da2d774e2bad4df35803d3c30f500.tar.gz
feed2imap-go-8c134b0ece0da2d774e2bad4df35803d3c30f500.tar.bz2
feed2imap-go-8c134b0ece0da2d774e2bad4df35803d3c30f500.zip
Push global feed configuration to feeds
Diffstat (limited to '')
-rw-r--r--pkg/config/yaml.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/config/yaml.go b/pkg/config/yaml.go
index 53d4d98..84f4af6 100644
--- a/pkg/config/yaml.go
+++ b/pkg/config/yaml.go
@@ -98,6 +98,7 @@ func buildFeeds(cfg []configGroupFeed, target []string, feeds Feeds) error {
return fmt.Errorf("Entry with Target %s is both a Feed and a group", target)
case f.isFeed():
+ feedCopy := f.Feed
name := f.Feed.Name
if name == "" {
return fmt.Errorf("Unnamed feed")
@@ -106,8 +107,8 @@ func buildFeeds(cfg []configGroupFeed, target []string, feeds Feeds) error {
if _, ok := feeds[name]; ok {
return fmt.Errorf("Duplicate Feed Name '%s'", name)
}
- f.Feed.Target = target
- feeds[name] = f.Feed
+ feedCopy.Target = target
+ feeds[name] = &feedCopy
case f.isGroup():
if err := buildFeeds(f.Group.Feeds, target, feeds); err != nil {