This commit is contained in:
@@ -91,7 +91,31 @@ func formatType(t string) string {
|
||||
switch t {
|
||||
case "ram":
|
||||
return "Random Access Memory"
|
||||
case "hdd":
|
||||
return "Hard Disk Drive"
|
||||
default:
|
||||
return t
|
||||
}
|
||||
}
|
||||
|
||||
type SelectMenu struct {
|
||||
Name string
|
||||
Label string
|
||||
Selected string
|
||||
Options []string
|
||||
DefaultValue string
|
||||
}
|
||||
|
||||
func createSelectMenu(name, label, selected string, options []string) SelectMenu {
|
||||
return createSelectMenuDefault(name, label, selected, options, "Unknown")
|
||||
}
|
||||
|
||||
func createSelectMenuDefault(name, label, selected string, options []string, defaultValue string) SelectMenu {
|
||||
return SelectMenu{
|
||||
Name: name,
|
||||
Label: label,
|
||||
Selected: selected,
|
||||
Options: options,
|
||||
DefaultValue: defaultValue,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user