Closed ghost closed 6 years ago
Consider a RSS feed with no feeds:
<?xml version="1.0" encoding="utf-8"?> <rss version="2.0"> <channel> <title>Willkommen auf unserem Blog</title> <link>https://www.bitkom.org//bitkom/org/Presse/Blog/index.jsp</link> <description>Der RSS Feed mit den aktuellsten Blogbeiträgen</description> <language>de</language> </channel> </rss>
For such a feed parseRSS2 returns an error:
parseRSS2
https://github.com/SlyMarbo/rss/blob/6288663a2d2f9d8c80085f6d2ae9b80cf35e355a/rss_2.0.go#L65
But such a feed is valid.
Wouldn't it more consistent to not return an error but a Feed with no items?
Feed
Very sensible suggestion, which I've implemented. Thanks!
Great, thank you!
Consider a RSS feed with no feeds:
For such a feed
parseRSS2
returns an error:https://github.com/SlyMarbo/rss/blob/6288663a2d2f9d8c80085f6d2ae9b80cf35e355a/rss_2.0.go#L65
But such a feed is valid.
Wouldn't it more consistent to not return an error but a
Feed
with no items?