blhistory

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BLHistory

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

BLHistory is a browser-like history: we can add more items to the history; we can go back and forth; when we're a few items back and we add a new item, a new item is added at this place in the history and all the previously existing newer items are dropped; there is no persistence.

A cache can be added to every history item too, but that's a TODO.

func New

func New() *BLHistory

func (*BLHistory) Add

func (h *BLHistory) Add(s string)

func (*BLHistory) Next

func (h *BLHistory) Next() *Item

func (*BLHistory) Prev

func (h *BLHistory) Prev() *Item

type Item

type Item struct {
	Time time.Time

	Str string
}

Jump to

Keyboard shortcuts

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