prompt

package
v0.0.297-pre-1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package prompt implements input-related functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confirm

func Confirm(ctx context.Context, message string) (confirm bool, err error)

func Confirmf added in v0.0.257

func Confirmf(ctx context.Context, format string, a ...interface{}) (bool, error)

func IsNonInteractive

func IsNonInteractive(err error) bool

func Org

Org returns the Organization the user has passed in via flag or prompts the user for one.

func Password added in v0.0.261

func Password(ctx context.Context, dst *string, msg string, required bool) error

func Region added in v0.0.271

func Region(ctx context.Context) (*api.Region, error)

Region returns the region the user has passed in via flag or prompts the user for one.

func Select

func Select(ctx context.Context, index *int, msg, def string, options ...string) error

func SelectOrg added in v0.0.257

func SelectOrg(ctx context.Context, orgs []api.Organization) (org *api.Organization, err error)

func SelectRegion added in v0.0.271

func SelectRegion(ctx context.Context, regions []api.Region, defaultCode string) (region *api.Region, err error)

func String

func String(ctx context.Context, dst *string, msg, def string, required bool) error

Types

type NonInteractiveError added in v0.0.261

type NonInteractiveError string

func (NonInteractiveError) Error added in v0.0.261

func (e NonInteractiveError) Error() string

func (NonInteractiveError) Unwrap added in v0.0.261

func (NonInteractiveError) Unwrap() error

Jump to

Keyboard shortcuts

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