Add serializing RSS items and change NewFeed to New

This commit is contained in:
Bel LaPointe
2018-10-08 15:33:52 -06:00
parent 389bda7d40
commit 1884fda442
3 changed files with 19 additions and 2 deletions

View File

@@ -35,7 +35,7 @@ func (feed *Feed) ID() string {
return strings.Join(regexp.MustCompile("[a-zA-Z0-9]*").FindAllString(feed.Link, -1), "_")
}
func NewFeed(source, itemFilter, contentFilter string) (*Feed, []*Item, error) {
func New(source, itemFilter, contentFilter string) (*Feed, []*Item, error) {
if _, err := regexp.Compile(itemFilter); err != nil {
return nil, nil, err
}