tui

package
v0.0.0-...-4add913 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blue

func Blue(str string) string

Blue returns a colored string of #8df9d9

func BoolPrompt

func BoolPrompt(msg string, defaultVal string) (bool, error)

func Choice

func Choice(prompt string, choices []string) (string, error)

func Critical

func Critical(str string) string

Critical returns a colored string of #ff3933

func Pink

func Pink(str string) string

Pink returns a colored string of #ff06b7

func StringPrompt

func StringPrompt(msg string, Placeholder, defaultVal string) (string, error)

func Warning

func Warning(str string) string

Warning returns a colored string of #ff6a69

Types

type TextInput

type TextInput struct {
	Msg         string
	Placeholder string
	IntialValue string
	FinalValue  string
}

type Tui

type Tui struct {
	Inputs []textinput.Model

	Err  error
	Done bool
	// contains filtered or unexported fields
}

func (*Tui) Execute

func (t *Tui) Execute()

func (*Tui) Init

func (m *Tui) Init() tea.Cmd

func (*Tui) Update

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

func (*Tui) View

func (m *Tui) View() string

Jump to

Keyboard shortcuts

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