prompt

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: MIT Imports: 8 Imported by: 0 modules, 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

Overview

Package prompt provides interactive prompts for the Mush CLI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIKey

func APIKey(out *output.Writer) (string, error)

APIKey prompts the user for an API key.

func SelectHabitat

func SelectHabitat(habitats []client.HabitatSummary, out *output.Writer) (*client.HabitatSummary, error)

SelectHabitat prompts the user to select a habitat from a list.

func SelectQueue

func SelectQueue(queues []client.QueueSummary, out *output.Writer) (*client.QueueSummary, error)

SelectQueue prompts the user to select a queue from a list.

Types

type Prompter

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

Prompter handles interactive prompts.

func New

func New(out *output.Writer) *Prompter

New creates a new Prompter.

func (*Prompter) CanPrompt

func (p *Prompter) CanPrompt() bool

CanPrompt returns true if interactive prompts are available.

func (*Prompter) Confirm

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

Confirm prompts for a yes/no confirmation.

func (*Prompter) Password

func (p *Prompter) Password(prompt string) (string, error)

Password prompts for a password (hidden input).

func (*Prompter) Select

func (p *Prompter) Select(message string, options []string) (int, error)

Select prompts the user to select from a list of options.

Jump to

Keyboard shortcuts

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