history

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type History

type History struct {
	Messages []string `json:"messages"`
	// contains filtered or unexported fields
}

func New

func New(opts ...Opt) (*History, error)

func (*History) Add

func (h *History) Add(message string) error

func (*History) LatestMatch added in v1.9.11

func (h *History) LatestMatch(prefix string) string

LatestMatch returns the most recent history entry that extends the provided prefix, or the latest message when no prefix is supplied.

func (*History) Next

func (h *History) Next() string

func (*History) Previous

func (h *History) Previous() string

type Opt added in v1.15.3

type Opt func(*options)

func WithBaseDir added in v1.15.3

func WithBaseDir(dir string) Opt

Jump to

Keyboard shortcuts

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