mirror of
https://github.com/miniflux/v2.git
synced 2025-07-17 17:08:36 +00:00
Improve OPML package to be more idiomatic
This commit is contained in:
parent
e91a9b4f13
commit
c26787f476
7 changed files with 50 additions and 40 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
package opml
|
||||
|
||||
// Subcription represents a feed that will be imported or exported.
|
||||
type Subcription struct {
|
||||
Title string
|
||||
SiteURL string
|
||||
|
@ -11,8 +12,11 @@ type Subcription struct {
|
|||
CategoryName string
|
||||
}
|
||||
|
||||
// Equals compare two subscriptions.
|
||||
func (s Subcription) Equals(subscription *Subcription) bool {
|
||||
return s.Title == subscription.Title && s.SiteURL == subscription.SiteURL && s.FeedURL == subscription.FeedURL && s.CategoryName == subscription.CategoryName
|
||||
return s.Title == subscription.Title && s.SiteURL == subscription.SiteURL &&
|
||||
s.FeedURL == subscription.FeedURL && s.CategoryName == subscription.CategoryName
|
||||
}
|
||||
|
||||
// SubcriptionList is a list of subscriptions.
|
||||
type SubcriptionList []*Subcription
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue