1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

Refactor feed discovery and avoid an extra HTTP request if the url provided is the feed

This commit is contained in:
Frédéric Guillot 2023-10-22 16:07:06 -07:00
parent 14e25ab9fe
commit eeaab72a9f
31 changed files with 455 additions and 200 deletions

View file

@ -12,6 +12,10 @@ type Subscription struct {
Type string `json:"type"`
}
func NewSubscription(title, url, kind string) *Subscription {
return &Subscription{Title: title, URL: url, Type: kind}
}
func (s Subscription) String() string {
return fmt.Sprintf(`Title="%s", URL="%s", Type="%s"`, s.Title, s.URL, s.Type)
}