utils

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cycle

func Cycle(n int, by int, max int) int

func Max

func Max(x, y int) int

func Update

func Update[T Updatable[T]](model T, msg tea.Msg) (T, tea.Cmd)

Types

type CmdCollector

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

func (*CmdCollector) Add

func (c *CmdCollector) Add(cmd tea.Cmd)

func (CmdCollector) Cmd

func (c CmdCollector) Cmd() tea.Cmd

func (*CmdCollector) Collect

func (c *CmdCollector) Collect(m any, cmd tea.Cmd) any

type Updatable

type Updatable[T any] interface {
	Update(msg tea.Msg) (T, tea.Cmd)
}

Jump to

Keyboard shortcuts

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