Documentation ¶
Index ¶
- Variables
- func AlwaysValid(input string) (string, string, bool)
- func Close()
- func DisplayResult(message []string, uiEvents <-chan ui.Event, menus chan<- string) (string, error)
- func Init() error
- func PromptConfirmation(message string, uiEvents <-chan ui.Event, menus chan<- string) (bool, error)
- func PromptTextInput(introwords string, isValid validCheck, uiEvents <-chan ui.Event, ...) (string, error)
- type Entry
- type Progress
Constants ¶
This section is empty.
Variables ¶
View Source
var BackRequest = errors.New("User requested to return to a previous menu.")
View Source
var ExitRequest = errors.New("User requested to exit the program.")
Functions ¶
func AlwaysValid ¶
AlwaysValid is a special isValid function that check nothing
func DisplayResult ¶
DisplayResult opens a new window and displays a message. each item in the message array will be displayed on a single line.
func PromptConfirmation ¶
Types ¶
type Entry ¶
type Entry interface { // Label returns the string will show in menu. Label() string }
Entry contains all the information needed for a boot entry.
func PromptMenuEntry ¶
func PromptMenuEntry(menuTitle string, introwords string, entries []Entry, uiEvents <-chan ui.Event, menus chan<- string, customWarning ...string) (Entry, error)
PromptMenuEntry presents all entries into a menu with numbers. user inputs a number to choose from them. customWarning allow self-defined warnings in the menu for example the wifi menu want to show specific warning when user hit a specific entry, because some wifi's type may not be supported.
Click to show internal directories.
Click to hide internal directories.