ui

package
v0.15.6-rc.2 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Emoji_Magnifier      = emoji.Sprint(":mag:")
	Emoji_RedCircle      = emoji.Sprint(":red_circle:")
	Emoji_Sparkles       = emoji.Sprint(":sparkles:")
	Emoji_Truck          = emoji.Sprint(":truck:")
	Emoji_WhiteCheckMark = emoji.Sprint(":white_check_mark:")
	Emoji_YellowCircle   = emoji.Sprint(":large_yellow_circle:")
)

Functions

This section is empty.

Types

type ConsoleUI

type ConsoleUI interface {
	Banner(version string)

	Panic(error)
	Exit(string)

	Errorf(string, ...any)
	Warningf(string, ...any)
	Infof(string, ...any)
	Printlnf(string, ...any)

	Error(string)
	Warning(string)
	Info(string)
	Success(string)
	Finish()

	Println(string)
	Title(string)
	OpenBrowser(string) error

	Green(string) string
	Red(string) string

	Confirm(prompt string, defaultValue bool) bool
	Enter(msg string) bool
	Select(prompt string, options []Option, defaultIndex int) (selected Option)
	TextInput(msg, defaultValue string) string
}
var DefaultUI ConsoleUI = &ptermUI{}

type Option

type Option struct {
	Text string
	Fn   func(ui ConsoleUI)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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