rss

package module
v0.0.0-...-c78b134 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: ISC Imports: 6 Imported by: 0

Documentation

Overview

Package rss implements RSS fetcher

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	Link        string `xml:"link"`
	Language    string `xml:"language"`
	Title       string `xml:"title"`
	Description string `xml:"description"`
	PubDate     Time   `xml:"pubDate"`
	Items       []Item `xml:"item"`
}

Channel container

type Item

type Item struct {
	Author  string `xml:"author"`
	Link    string `xml:"link"`
	GUID    string `xml:"guid"`
	Title   string `xml:"title"`
	PubDate Time   `xml:"pubDate"`
}

Item container

type RSS

type RSS struct {
	Version string  `xml:"version,attr"`
	Channel Channel `xml:"channel"`
}

RSS container

func Fetch

func Fetch(url string) (rss RSS, err error)

Fetch and parse RSS from given URL

type Time

type Time struct {
	time.Time
}

Time in RFC1123Z or RFC1123 format

func (*Time) UnmarshalXML

func (t *Time) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML decodes Time format

Jump to

Keyboard shortcuts

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