chspinner

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2025 License: MIT Imports: 5 Imported by: 0

README

/internal/ui/chspinner

chspinner uses channel to pass data to the bubbletea model.

The channel size is 1 so the performance may be restricted.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(init string, f Task) error

Types

type Spinner

type Spinner struct {
	Error error // error returned from task
	// contains filtered or unexported fields
}

func New

func New(init string, f Task) Spinner

func (Spinner) Init

func (m Spinner) Init() tea.Cmd

func (Spinner) Update

func (m Spinner) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Spinner) View

func (m Spinner) View() string

type Task

type Task func(up chan<- string, quit <-chan bool) error

Interactive work procedure.

Jump to

Keyboard shortcuts

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