tui

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Reset  = "\033[0m"
	Red    = "\033[31m"
	Green  = "\033[32m"
	Blue   = "\033[34m"
	Yellow = "\033[33m"
	Purple = "\033[35m"
	Cyan   = "\033[36m"
	White  = "\033[37m"
	Bold   = "\033[1m"
)

ANSI color codes

Variables

This section is empty.

Functions

func ExtractPublicKey

func ExtractPublicKey(input string) string

ExtractPublicKey extracts the public key from XML-like tags

func ExtractSecret

func ExtractSecret(input string) string

ExtractSecret extracts the secret from XML-like tags

func IsQuit

func IsQuit(input string) bool

IsQuit checks if the user input is a quit command

func ParseRoleInput

func ParseRoleInput(input string) string

ParseRoleInput parses the user's role selection input

func PrintError

func PrintError(message string)

PrintError displays an error message to the user with better formatting and colors

func PrintHeader

func PrintHeader(message string)

PrintHeader displays a header message with styling

func PrintInfo

func PrintInfo(message string)

PrintInfo displays an info message to the user with better formatting and colors

func PrintMessage

func PrintMessage(message string)

PrintMessage displays a message to the user with better formatting

func PrintSuccess

func PrintSuccess(message string)

PrintSuccess displays a success message to the user with better formatting and colors

func PromptSecret

func PromptSecret(prompt string) string

PromptSecret displays a prompt and waits for user input, masking the characters Adds proper spacing and styling

func PromptUser

func PromptUser(prompt string) string

PromptUser displays a prompt and waits for user input Adds proper spacing and styling

func PromptUserSingleChar

func PromptUserSingleChar(prompt string) string

PromptUserSingleChar displays a prompt and waits for a single character input Adds proper spacing and styling

func SetClipboard

func SetClipboard(text string) error

SetClipboard copies the given text to the system clipboard Returns an error if the operation is not supported or fails

Types

This section is empty.

Jump to

Keyboard shortcuts

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