tui

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrYesNoInvalid means input does not match Y/y or N/n.
	ErrYesNoInvalid = errors.New("tui: invalid input, please y or n")
)

Functions

func YesNo

func YesNo(msg string, reader io.Reader) bool

YesNo displays a y/n prompt with given msg.

Types

type Spinner

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

Spinner represents a progress spinner.

func NewSpinner

func NewSpinner(interval time.Duration, msg string) *Spinner

NewSpinner returns a spinner from given interval and message.

func (*Spinner) Start

func (spinner *Spinner) Start()

Start starts a spinner.

func (*Spinner) Stop

func (spinner *Spinner) Stop()

Stop stops a spinner.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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