cli

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintBanner

func PrintBanner(title string)

PrintBanner displays a CLI banner with the given title.

func PrintCredentials

func PrintCredentials(username, password, apiKey string, userCreated bool)

PrintCredentials prints credentials in a formatted box.

func PrintError

func PrintError(message string)

PrintError displays an error message with an X.

func PrintStep

func PrintStep(step int, message string)

PrintStep displays a numbered step message.

func PrintSuccess

func PrintSuccess(message string)

PrintSuccess displays a success message with a checkmark.

func PrintWarning

func PrintWarning(message string)

PrintWarning displays a warning message.

func Select

func Select[T any](p *Prompter, message string, options []Option[T]) (T, error)

Types

type Option

type Option[T any] struct {
	Label string
	Value T
}

type Prompter

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

func NewPrompter

func NewPrompter(r io.Reader) *Prompter

func (*Prompter) Confirm

func (p *Prompter) Confirm(message string) (bool, error)

func (*Prompter) Input

func (p *Prompter) Input(message, defaultVal string) (string, error)

Jump to

Keyboard shortcuts

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