Help us shape the future of Go! Take the 2026 Go Developer Survey

hackernews

package
v0.0.0-...-09a8bdb Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package hackernews shows the Hacker News front page via the Algolia API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx widget.Context) (widget.Widget, error)

New builds a hackernews widget from its dashboard configuration.

Types

type HackerNews

type HackerNews struct {
	widget.Base
	// contains filtered or unexported fields
}

HackerNews lists front-page stories.

func (*HackerNews) Actions

func (h *HackerNews) Actions() []widget.Action

Actions exposes opening the selected story in the system browser.

func (*HackerNews) Init

func (h *HackerNews) Init() tea.Cmd

Init starts the first fetch.

func (*HackerNews) Update

func (h *HackerNews) Update(msg tea.Msg) tea.Cmd

Update handles navigation, fetch results and the refresh timer.

func (*HackerNews) View

func (h *HackerNews) View() string

View renders the story list. Each story takes two lines when there is room: the title, then a dim metadata line.

Jump to

Keyboard shortcuts

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