Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RSSFeed ¶
type RSSFeed struct { Channel struct { Title string `xml:"title"` // The title of the RSS feed Link string `xml:"link"` // The URL link of the RSS feed Description string `xml:"description"` // A brief description of the RSS feed Item []RSSItem `xml:"item"` // A list of items (posts) in the RSS feed } `xml:"channel"` }
RSSFeed represents the structure of an RSS feed parsed from XML.
func FetchFeed ¶
FetchFeed retrieves and parses an RSS feed from the provided URL.
Parameters: - ctx: A context for managing request cancellation and timeouts. - feedURL: The URL of the RSS feed to fetch.
Returns: - A pointer to the RSSFeed struct containing the parsed feed data. - An error if the feed cannot be retrieved or parsed.
type RSSItem ¶
type RSSItem struct { Title string `xml:"title"` // The title of the RSS item Link string `xml:"link"` // The URL link to the RSS item Description string `xml:"description"` // A brief description of the RSS item PubDate string `xml:"pubDate"` // The publication date of the RSS item }
RSSItem represents an individual item (post) in an RSS feed.
Click to show internal directories.
Click to hide internal directories.