ui

package
v0.14.6-rc.3 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

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

type UI

type UI interface {
	Banner(version string)

	Panic(error)
	Exit(string)

	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 UI = &ptermUI{}

Jump to

Keyboard shortcuts

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