prompt

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FuzzyFilterKonf added in v0.2.0

func FuzzyFilterKonf(searchTerm string, curItem *store.Metadata) bool

FuzzyFilterKonf allows fuzzy searching of a list of konf metadata in the form of store.TableOutput

func NewTableOutputTemplates added in v0.2.0

func NewTableOutputTemplates(maxColumnLen int) (inactive, active, label string, fmap template.FuncMap)

NewTableOutputTemplates returns templating strings for creating a nicely formatted table out of an store.Metadata. Additionally it returns a template.FuncMap with all required templating funcs for the strings. Maximum length per column can be configured.

func Terminal

func Terminal(prompt *promptui.Select) (sel int, err error)

Terminal runs a given prompt in the terminal of the user and returns the selected items position

Types

type RunFunc

type RunFunc func(*promptui.Select) (int, error)

RunFunc describes a generic function of a prompt. It returns the selected item. Its main purpose is to be easily mockable for unit-tests

Jump to

Keyboard shortcuts

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