news

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse added in v0.0.2

func Parse(r io.Reader, v *NewsTable) error

Types

type Article

type Article struct {
	Title string
	Link  string
}

func ParseArticle added in v0.0.2

func ParseArticle(t *html.Tokenizer) (v Article, err error)

type NewsClient added in v0.0.2

type NewsClient struct {
	// contains filtered or unexported fields
}

func NewClient added in v0.0.2

func NewClient(cacheDuration time.Duration) *NewsClient

func (*NewsClient) Article added in v0.0.2

func (n *NewsClient) Article(url string) (*[]byte, error)

func (*NewsClient) News added in v0.0.2

func (n *NewsClient) News() (*NewsTable, error)

type NewsTable

type NewsTable struct {
	Articles map[string]Article
}

Jump to

Keyboard shortcuts

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