From 1db1fcb9c815bee364c38637dcac22493a41673e Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Fri, 30 Aug 2024 22:25:18 +0200 Subject: [PATCH] Get rid of non-standard Content --- rss.go | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/rss.go b/rss.go index a2c3075..7dda1e0 100644 --- a/rss.go +++ b/rss.go @@ -35,11 +35,6 @@ type Source struct { Value string } -type Content struct { - XMLName xml.Name `xml:"content:encoded"` - Value string `xml:",cdata"` -} - type Item struct { XMLName xml.Name `xml:"item"` Title string `xml:"title,omitempty"` @@ -51,7 +46,6 @@ type Item struct { Guid string `xml:"guid,omitempty"` PubDate string `xml:"pubDate,omitempty"` Source *Source - Content *Content Categories []string `xml:"category,omitempty"` } @@ -142,14 +136,6 @@ func (s *Source) check() error { return nil } -func (c *Content) check() error { - if len(c.Value) == 0 { - return fmt.Errorf("error: value not set") - } - - return nil -} - func (i *Item) check() error { if len(i.Title) == 0 && len(i.Description) == 0 { return fmt.Errorf("error: neither title nor description set") @@ -167,12 +153,6 @@ func (i *Item) check() error { } } - if i.Content != nil { - if err := i.Content.check(); err != nil { - return fmt.Errorf("error checking content: %v", err) - } - } - return nil }