Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ItemScanner = felix.ScanFunc(func(ctx context.Context, r io.Reader, e felix.Emitter) error { fp := gofeed.NewParser() feed, err := fp.Parse(r) if err != nil { return errors.Wrap(err, "could not parse RSS feed") } for _, item := range feed.Items { e.EmitItem(felix.Item{ Title: item.Title, URL: item.Link, PubDate: time.Now(), }) } return nil })
ItemScanner parses r as an RSS feed and extracts all feed items.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.