confirm

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const TemplateYN = `` /* 365-byte string literal not displayed */

Variables

This section is empty.

Functions

func Show

func Show(confirm uimsg.Confirm, options ...Option) bool

Types

type KeyMap

type KeyMap struct {
	// Keybindings used when browsing the list.
	CursorUp   key.Binding
	CursorDown key.Binding
	Yes        key.Binding
	No         key.Binding
	Toggle     key.Binding
	Apply      key.Binding

	// The quit keybinding. This won't be caught when filtering.
	Quit key.Binding

	// The quit-no-matter-what keybinding. This will be caught when filtering.
	ForceQuit key.Binding
}

KeyMap defines keybindings. It satisfies to the help.KeyMap interface, which is used to render the menu menu.

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithIn

func WithIn(input io.Reader) Option

func WithOut

func WithOut(out io.Writer) Option

func WithStyler

func WithStyler(styler style.Style) Option

Jump to

Keyboard shortcuts

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