aboutsummaryrefslogtreecommitdiff
path: root/internal/reader/atom/atom_common.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/reader/atom/atom_common.go')
-rw-r--r--internal/reader/atom/atom_common.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/internal/reader/atom/atom_common.go b/internal/reader/atom/atom_common.go
index debd46f1..945c5573 100644
--- a/internal/reader/atom/atom_common.go
+++ b/internal/reader/atom/atom_common.go
@@ -96,6 +96,21 @@ func (a AtomLinks) firstLinkWithRelationAndType(relation string, contentTypes ..
return ""
}
+func (a AtomLinks) findAllLinksWithRelation(relation string) []*AtomLink {
+ var links []*AtomLink
+
+ for _, link := range a {
+ if strings.EqualFold(link.Rel, relation) {
+ link.Href = strings.TrimSpace(link.Href)
+ if link.Href != "" {
+ links = append(links, link)
+ }
+ }
+ }
+
+ return links
+}
+
// The "atom:category" element conveys information about a category
// associated with an entry or feed. This specification assigns no
// meaning to the content (if any) of this element.