refactor and start adding actual functionality
This commit is contained in:
parent
9efa0ee226
commit
82fec3ab58
11 changed files with 158 additions and 33 deletions
|
@ -16,6 +16,20 @@ func YesNo(msg string) string {
|
|||
return choice
|
||||
}
|
||||
|
||||
func YesNoBack(msg string) string {
|
||||
// Make the menu
|
||||
menu := gocliselect.NewMenu(msg)
|
||||
menu.AddItem("Yes", "y")
|
||||
menu.AddItem("No", "n")
|
||||
menu.AddItem("Go Back", "back")
|
||||
|
||||
// Display the menu
|
||||
choice := menu.Display()
|
||||
|
||||
// Return the value selected
|
||||
return choice
|
||||
}
|
||||
|
||||
func YesNoEXT(msg string) string {
|
||||
// Make the menu
|
||||
menu := gocliselect.NewMenu(msg)
|
||||
|
@ -29,3 +43,18 @@ func YesNoEXT(msg string) string {
|
|||
// Return the value selected
|
||||
return choice
|
||||
}
|
||||
|
||||
// Make a YesNo menu
|
||||
func YesNoManual(msg string) string {
|
||||
// Make the menu
|
||||
menu := gocliselect.NewMenu(msg)
|
||||
menu.AddItem("Yes", "y")
|
||||
menu.AddItem("No", "n")
|
||||
menu.AddItem("Manual Entry", "manual")
|
||||
|
||||
// Display the menu
|
||||
choice := menu.Display()
|
||||
|
||||
// Return the value selected
|
||||
return choice
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue