util

package
v0.210.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlertError added in v0.2.0

func AlertError(msg string) tea.Cmd

AlertError creates a bubbleup error overlay alert.

func AlertInfo added in v0.2.0

func AlertInfo(msg string) tea.Cmd

AlertInfo creates a bubbleup info overlay alert.

func AlertPersist added in v0.2.0

func AlertPersist(alertType, msg string) tea.Cmd

AlertPersist creates a persistent bubbleup alert that stays until Esc is pressed.

func AlertWarn added in v0.2.0

func AlertWarn(msg string) tea.Cmd

AlertWarn creates a bubbleup warning overlay alert.

func Clamp

func Clamp(v, low, high int) int

func CmdHandler

func CmdHandler(msg tea.Msg) tea.Cmd

func ReportError

func ReportError(err error) tea.Cmd

func ReportInfo

func ReportInfo(info string) tea.Cmd

func ReportWarn

func ReportWarn(warn string) tea.Cmd

Types

type AlertMsg added in v0.2.0

type AlertMsg struct {
	Type    string // bubbleup alert key: "Info", "Warn", "Error"
	Msg     string
	Persist bool // if true, alert stays until dismissed with Esc
}

AlertMsg triggers a bubbleup overlay alert instead of the status bar.

type ClearStatusMsg

type ClearStatusMsg struct{}

type InfoMsg

type InfoMsg struct {
	Type InfoType
	Msg  string
	TTL  time.Duration
}

type InfoType

type InfoType int
const (
	InfoTypeInfo InfoType = iota
	InfoTypeWarn
	InfoTypeError
)

Jump to

Keyboard shortcuts

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