Start process to away from bubbletea to a more simpler solution for this projects needs

This commit is contained in:
HikariKnight 2023-10-26 20:03:15 +02:00
parent cc6db38d74
commit c1ea5e5163
10 changed files with 298 additions and 65 deletions

31
pkg/menu/yesno.go Normal file
View file

@ -0,0 +1,31 @@
package menu
import "github.com/nexidian/gocliselect"
// Make a YesNo menu
func YesNo(msg string) string {
// Make the menu
menu := gocliselect.NewMenu(msg)
menu.AddItem("Yes", "y")
menu.AddItem("No", "n")
// Display the menu
choice := menu.Display()
// Return the value selected
return choice
}
func YesNoEXT(msg string) string {
// Make the menu
menu := gocliselect.NewMenu(msg)
menu.AddItem("Yes", "y")
menu.AddItem("No", "n")
menu.AddItem("ADVANCED: View with extended related search by vendor ID, results will be inaccurate", "ext")
// Display the menu
choice := menu.Display()
// Return the value selected
return choice
}