Skip to content

Commit

Permalink
Fix add missing error return
Browse files Browse the repository at this point in the history
  • Loading branch information
bake committed May 2, 2020
1 parent be4d487 commit 5bae91c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions feed/feed.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"time"

"github.com/mmcdole/gofeed"
"github.com/pkg/errors"
)

type Feed struct {
Expand Down Expand Up @@ -48,6 +49,9 @@ func NewParser(c *http.Client) *Parser {

func (p *Parser) ParseURL(url string) (*Feed, error) {
f, err := p.Parser.ParseURL(url)
if err != nil {
return nil, errors.Wrap(err, "could not parse feed")
}
items := make([]*Item, len(f.Items))
for i, item := range f.Items {
items[i] = &Item{Item: item, Feed: f}
Expand Down

0 comments on commit 5bae91c

Please sign in to comment.