gui

package
v0.0.0-...-c4ec94d Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Spin is a spinner used to indicate a pending process

Functions

func ConfirmPrompt

func ConfirmPrompt(label string, helpMessage string, defaultVal bool, disableClear bool) bool

ConfirmPrompt prompts the user for a yes/no response to a question, records then returns their response

func Exit

func Exit()

Exit says by and exits the program

func InputPromptWithResponse

func InputPromptWithResponse(label string, defaultVal string, disableClear bool) string

InputPromptWithResponse accepts a user's typed input to a question as a response

func Log

func Log(e interface{}, msg string, extra interface{})

Log is a logging helper that allows custom input with the emoji

func OhNo

func OhNo(msg string)

OhNo is a logging helper for an uh-oh-esque message

func PleaseHold

func PleaseHold(msg string, extra interface{})

PleaseHold is a logging helper for indicating active processes

func RenderMarkdown

func RenderMarkdown(body string) string

RenderMarkdown accepts a markdown formatted string and renders it in the terminal

func RenderTable

func RenderTable(header table.Row, rows []table.Row)

RenderTable outputs data into a table

func SelectPromptWithResponse

func SelectPromptWithResponse(label string, options []string, defaultValue interface{}, disableClear bool) string

SelectPromptWithResponse creates a dropdown selection prompt and records the user's choice

func SideBySideTable

func SideBySideTable(rows []table.Row)

SideBySideTable is used for displaying information

func TextEditorInputAndSave

func TextEditorInputAndSave(label string, defaultText string, editor string) string

TextEditorInputAndSave launches a temporary file with a text editor, captures the input on save, and removes the tmp file while closing the editor

Types

This section is empty.

Jump to

Keyboard shortcuts

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