display

package
v0.0.0-...-6da9eb2 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListInColumns

func ListInColumns(list []string) error

ListInColumns prints a slice of strings in equal-width columns. It uses the Termsz library to get the terminal size to calculate the optimal number of columns. If the terminal size cannot be obtained, the function returns an error.

func ListInSingleColumn

func ListInSingleColumn(list []string)

ListInSingleColumn prints a slice of strings in a single column.

func MultiSelectPrompt

func MultiSelectPrompt(message string, options []string) ([]string, error)

MultiSelectPrompt displays a multi-select prompt with the provided message and options and returns the user's selections as a slice of strings and an error if any.

func SelectPrompt

func SelectPrompt(message string, options []string) (string, error)

SelectPrompt displays a selection prompt with the provided message and options and returns the user's selection as a string and an error if any.

Types

This section is empty.

Jump to

Keyboard shortcuts

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