diff --git a/pkg/menu/genmenu.go b/pkg/menu/genmenu.go index 52f03ce..f1e917a 100644 --- a/pkg/menu/genmenu.go +++ b/pkg/menu/genmenu.go @@ -7,7 +7,7 @@ import ( "github.com/nexidian/gocliselect" ) -func GenIOMMUMenu(msg string, choices []string) string { +func GenIOMMUMenu(msg string, choices []string, none_option ...int) string { // Make a regex to get the iommu group iommu_group_regex := regexp.MustCompile(`(\d{1,3})`) @@ -23,6 +23,12 @@ func GenIOMMUMenu(msg string, choices []string) string { menu.AddItem(choice, iommuGroup) } + // If none_option is higher than 0 + if len(none_option) > 0 { + // Add a skip option + menu.AddItem(color.Bold.Sprint("Skip/None"), "skip") + } + // Add a go back option menu.AddItem(color.Bold.Sprint("Go Back"), "back")