ui

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confirm

func Confirm(action string, confirmText string) error

func IsTerminal

func IsTerminal(f *os.File) bool

IsTerminal is used to determine if the program is running is a terminal

func NewConfirmModel

func NewConfirmModel(action string, confirmText string) *confirmModel

func NewTable

func NewTable(writer io.Writer, headers []string) *tablewriter.Table

NewTable creates a new table with default settings

func RenderKVTable

func RenderKVTable(writer io.Writer, title string, rows [][]string)

RenderKVTable creates a new key/value table with default settings

Types

type Spinner

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

func NewSpinner

func NewSpinner(w io.Writer, logger logger.Logger) *Spinner

NewSpinner creates a new Spinner

func (*Spinner) Run

func (s *Spinner) Run(text string)

Run starts the spinner

func (*Spinner) Running

func (s *Spinner) Running() bool

Running returns the running status of the spinner

func (*Spinner) Stop

func (s *Spinner) Stop()

Stop stops the spinner

func (*Spinner) Text

func (s *Spinner) Text(t string)

Text sets the text of the spinner

Jump to

Keyboard shortcuts

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