feed

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package feed extends the package gofeed by adding a Date field to gofeed.Item which contains either the published or the updated date, since some feeds only offer a update time, as well as a sorting implementation based on the field.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feed

type Feed struct {
	gofeed.Feed
	Items []*Item
}

type Item

type Item struct {
	*gofeed.Item
	Feed     *gofeed.Feed
	Category string
}

func (*Item) Time

func (i *Item) Time() time.Time

type Parser

type Parser struct{ gofeed.Parser }

func NewParser

func NewParser(c *http.Client) *Parser

func (*Parser) ParseURL

func (p *Parser) ParseURL(url string) (*Feed, error)

type SortByDate

type SortByDate []*Item

func (SortByDate) Len

func (is SortByDate) Len() int

func (SortByDate) Less

func (is SortByDate) Less(i, j int) bool

func (SortByDate) Swap

func (is SortByDate) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL