aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader/feed/rss/parser.go
diff options
context:
space:
mode:
Diffstat (limited to 'reader/feed/rss/parser.go')
-rw-r--r--reader/feed/rss/parser.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/reader/feed/rss/parser.go b/reader/feed/rss/parser.go
index 52310e4..247c789 100644
--- a/reader/feed/rss/parser.go
+++ b/reader/feed/rss/parser.go
@@ -7,22 +7,23 @@ package rss
import (
"encoding/xml"
"fmt"
- "github.com/miniflux/miniflux2/model"
"io"
+ "github.com/miniflux/miniflux2/model"
+
"golang.org/x/net/html/charset"
)
// Parse returns a normalized feed struct.
func Parse(data io.Reader) (*model.Feed, error) {
- rssFeed := new(RssFeed)
+ feed := new(rssFeed)
decoder := xml.NewDecoder(data)
decoder.CharsetReader = charset.NewReaderLabel
- err := decoder.Decode(rssFeed)
+ err := decoder.Decode(feed)
if err != nil {
- return nil, fmt.Errorf("Unable to parse RSS feed: %v", err)
+ return nil, fmt.Errorf("unable to parse RSS feed: %v", err)
}
- return rssFeed.Transform(), nil
+ return feed.Transform(), nil
}