rss

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Пакет для работы с RSS-потоками. аккуратно украдено из примера реализации

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(f FeedInfo, feedID int) ([]storage.Article, error)

Parse читает rss-поток и возвращет массив раскодированных новостей.

Types

type FeedInfo

type FeedInfo struct {
	XMLName xml.Name   `xml:"rss"`
	Channel RSSChannel `xml:"channel"`
}

type Item

type Item struct {
	Title       string `xml:"title"`
	Description string `xml:"description"`
	PubDate     string `xml:"pubDate"`
	Link        string `xml:"link"`
}

type RSSChannel

type RSSChannel struct {
	Title       string `xml:"title"`
	Description string `xml:"description"`
	Link        string `xml:"link"`
	Items       []Item `xml:"item"`
}

Jump to

Keyboard shortcuts

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