本文整理匯總了Golang中github.com/urandom/readeef/content.Feed.AllArticles方法的典型用法代碼示例。如果您正苦於以下問題:Golang Feed.AllArticles方法的具體用法?Golang Feed.AllArticles怎麽用?Golang Feed.AllArticles使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/urandom/readeef/content.Feed
的用法示例。
在下文中一共展示了Feed.AllArticles方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: DeleteFeed
func (si SearchIndex) DeleteFeed(feed content.Feed) error {
articles := feed.AllArticles()
if !feed.HasErr() {
si.logger.Infof("Removing all articles from the search index for feed '%s'\n", feed)
si.batchDelete(articles)
} else {
return feed.Err()
}
return nil
}
示例2: FeedDeleted
func (i Index) FeedDeleted(feed content.Feed) error {
i.logger.Infof("Deleting article search index for feed '%s'\n", feed)
articles := feed.AllArticles()
if feed.HasErr() {
return fmt.Errorf("Error deleting all articles of %s from the search index: %v\n", feed, feed.Err())
} else {
i.logger.Infof("Deleting article search index for feed '%s'\n", feed)
return i.provider.BatchIndex(articles, data.BatchDelete)
}
}