Moved cli and web directory into app dir

This commit is contained in:
Lucas
2026-01-02 12:27:03 -08:00
parent c9f5feb9cb
commit 3fba4355fe
12 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
package cli
import (
"bufio"
"fmt"
"definitive-opencore/data"
)
func selectPlatforms(scanner *bufio.Scanner) ([]string, error) {
platforms, err := data.LoadPlatforms()
if err != nil {
return nil, err
}
selected := []string{}
for {
fmt.Println("Select platforms (0 to finish):")
for i, p := range platforms {
fmt.Printf("%d) %s\n", i+1, p.Name)
}
var idx int
fmt.Scanln(&idx)
if idx == 0 {
break
}
if idx > 0 && idx <= len(platforms) {
selected = append(selected, platforms[idx-1].ID)
}
}
return selected, nil
}