archnews

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Browse

func Browse(all bool) error

Browse walks through the news posts, waiting for the user to move to the next post, run out of posts, or quit. If the all is set to true, all posts in the feed will be shown. Otherwise only unread posts will be shown.

func Clear

func Clear() int

Clear stores all outstanding news items in the cache.

func Fetch

func Fetch(prompt bool) (int, string)

Fetch returns the number of unread items and a status message about them. If prompt is true, the user will be prompted to browse the items. An empty mesage is returned if prompt is true.

func Ls

func Ls(all bool) []string

Ls returns a formatted slice of (unread) items. If all is set to true, all posts will be returned. Otherwise only unread posts will be added.

func New

func New()

New sets up all the necessary data structures for archnews to function properly. New must (!) be called before Browse, Clear, Fetch, Ls, or Read.

func Read

func Read(postNum int) (string, error)

Read returns a formatted post from the feed matching the post number. An error is returned if the post number is out of bounds.

Types

This section is empty.

Jump to

Keyboard shortcuts

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