cli

package
v1.30.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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