func Fetch(url string) ([]types.Item, error) { curr, err := rss.Read(url) if err != nil { return nil, err } return convertToItems(curr) }
// FetchFeed retrieves an rss.Channel from the given URL, wrapping it in a // FetchedFeed structure to add metadata. func FetchFeed(feedURL string) (*FetchedFeed, error) { c, err := rss.Read(feedURL) if err != nil { return nil, err } f := FetchedFeed{time.Now(), feedURL, c} return &f, nil }