ui

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PromptOutputEnvironment selects the terminal stream used by interactive prompts.
	PromptOutputEnvironment = "SITECTL_PROMPT_OUTPUT"
	// PromptOutputStderr keeps stdout available for machine-readable protocols such as plugin RPC.
	PromptOutputStderr = "stderr"
)

Variables

This section is empty.

Functions

func CanPromptInteractively added in v1.7.0

func CanPromptInteractively() bool

func PromptChoice

func PromptChoice(opts ChoicePromptOptions) (string, bool, error)

func PromptTerminalWidth added in v1.7.0

func PromptTerminalWidth() (int, bool)

func PromptText

func PromptText(opts TextPromptOptions) (string, bool, error)

Types

type Choice

type Choice struct {
	Value            string
	Label            string
	Help             string
	AllowCustomInput bool
}

type ChoicePromptOptions

type ChoicePromptOptions struct {
	Name         string
	Sections     []string
	Choices      []Choice
	DefaultValue string
}

type TextPromptOptions

type TextPromptOptions struct {
	Sections []string
	Prompt   string
}

Jump to

Keyboard shortcuts

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