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 /internal/feed/feed.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-- | internal/feed/feed.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/internal/feed/feed.go b/internal/feed/feed.go index ef51251..4e84443 100644 --- a/internal/feed/feed.go +++ b/internal/feed/feed.go @@ -1,6 +1,7 @@ package feed import ( + "strings" "time" "github.com/mmcdole/gofeed" @@ -25,9 +26,15 @@ type feedDescriptor struct { } func (feed *Feed) descriptor() feedDescriptor { + var url string + if feed.Url != "" { + url = feed.Url + } else { + url = "exec://" + strings.Join(feed.Exec, "/") + } return feedDescriptor{ Name: feed.Name, - Url: feed.Url, + Url: url, } } |