hackernews

package
v0.0.0-...-7e94697 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProgram

func NewProgram(thread *Thread) *tea.Program

Types

type Comment

type Comment struct {
	Childs []*Comment
	// contains filtered or unexported fields
}

func (Comment) String

func (c Comment) String() (ret string)

type Model

type Model struct {
	*Thread
	// contains filtered or unexported fields
}

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type Op

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

func (Op) String

func (o Op) String() (ret string)

type Thread

type Thread struct {
	CommentWidth int
	LineWidth    int
	LeftPadding  int
	ShowDate     bool
	// contains filtered or unexported fields
}

func Fetch

func Fetch(
	rawUrl string,
	timeout time.Duration,
	maxComments uint,
	nWorkers uint,
) (*Thread, error)

func (Thread) String

func (thread Thread) String() (ret string)

Jump to

Keyboard shortcuts

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