rss

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

types for making an rss feed

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CData

type CData struct {
	Data string `xml:",cdata"`
}

type Feed

type Feed struct {
	XMLName        xml.Name `xml:"channel"`
	Title          string   `xml:"title"`
	Link           string   `xml:"link"`
	Description    string   `xml:"description"`
	ManagingEditor string   `xml:"managingEditor,omitempty"`
	PubDate        string   `xml:"pubDate,omitempty"`
	LastBuildDate  string   `xml:"lastBuildDate,omitempty"`
	TTL            int      `xml:"ttl,omitempty"`
	Image          *Image
	Items          []*Item
}

func (*Feed) Write

func (fd *Feed) Write(w io.Writer) error

Write the Feed as XML.

type Guid

type Guid struct {
	XMLName     xml.Name `xml:"guid"`
	IsPermaLink bool     `xml:"isPermaLink,attr"`
	Value       string   `xml:",chardata"`
}

type Image

type Image struct {
	XMLName xml.Name `xml:"image"`
	URL     string   `xml:"url"`
	Title   string   `xml:"title"`
	Link    string   `xml:"link"`
}

type Item

type Item struct {
	XMLName     xml.Name `xml:"item"`
	Title       string   `xml:"title"`
	Description CData    `xml:"description"`
	Author      string   `xml:"author,omitempty"`
	Category    []string `xml:"category"`
	Link        string   `xml:"link"`
	PubDate     string   `xml:"pubDate"`
	Guid        *Guid
	Source      *Source
}

type Source

type Source struct {
	XMLName xml.Name `xml:"source"`
	URL     string   `xml:"url,attr"`
	Title   string   `xml:",chardata"`
}

Jump to

Keyboard shortcuts

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