prompt

package
v0.0.0-...-732dc05 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Renderer

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

Renderer type is implementation of renderer that using prompts.

func NewRenderer

func NewRenderer(in *streams.In, out *streams.Out, useTTY bool) *Renderer

NewRenderer creates Renderer object.

func (*Renderer) InputMenu

func (r *Renderer) InputMenu(ctx context.Context, title string, validateFunc func(string) error) (string, error)

InputMenu function just display input menu.

func (r *Renderer) Logo()

Logo function just display logo.

func (*Renderer) SelectionMenu

func (r *Renderer) SelectionMenu(ctx context.Context, title string, items []string) (string, error)

SelectionMenu function just display selection menu.

func (*Renderer) TextMenu

func (r *Renderer) TextMenu(ctx context.Context, title string) (string, error)

func (*Renderer) WithSpinner

func (r *Renderer) WithSpinner(title string, fn func())

WithSpinner starts spinner while function is running.

Jump to

Keyboard shortcuts

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