ui

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Console

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

Console implements Prompter for terminal interaction

func NewConsole

func NewConsole() *Console

NewConsole creates a new Console prompter

func (*Console) Confirm

func (c *Console) Confirm(message string) bool

func (*Console) Input

func (c *Console) Input(prompt, defaultValue string) string

func (*Console) Print

func (c *Console) Print(message string)

func (*Console) Printf

func (c *Console) Printf(format string, args ...interface{})

type Prompter

type Prompter interface {
	Confirm(message string) bool
	Input(prompt, defaultValue string) string
	Print(message string)
	Printf(format string, args ...interface{})
}

Prompter handles user interaction

type Silent

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

Silent implements Prompter with auto-confirm (for -f flag or tests)

func NewSilent

func NewSilent(autoConfirm bool) *Silent

func (*Silent) Confirm

func (s *Silent) Confirm(message string) bool

func (*Silent) Input

func (s *Silent) Input(prompt, defaultValue string) string

func (*Silent) Print

func (s *Silent) Print(message string)

func (*Silent) Printf

func (s *Silent) Printf(format string, args ...interface{})

Jump to

Keyboard shortcuts

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