aboutsummaryrefslogtreecommitdiff
path: root/internal/feed/feed.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/feed/feed.go')
-rw-r--r--internal/feed/feed.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/feed/feed.go b/internal/feed/feed.go
index 0741e8c..ffe831f 100644
--- a/internal/feed/feed.go
+++ b/internal/feed/feed.go
@@ -9,6 +9,7 @@ import (
"github.com/Necoro/gofeed"
"github.com/Necoro/feed2imap-go/internal/feed/filter"
+ "github.com/Necoro/feed2imap-go/internal/http"
"github.com/Necoro/feed2imap-go/pkg/config"
"github.com/Necoro/feed2imap-go/pkg/log"
)
@@ -33,6 +34,13 @@ type Descriptor struct {
Url string
}
+func (feed *Feed) Context() http.Context {
+ return http.Context{
+ Timeout: feed.Global.Timeout,
+ DisableTLS: feed.NoTLS,
+ }
+}
+
func (feed *Feed) Descriptor() Descriptor {
var url string
if feed.Url != "" {