first prototype

This commit is contained in:
2025-12-01 08:38:21 +00:00
parent e07d34d626
commit 1e5fd35659
14 changed files with 2431 additions and 1 deletions

26
csv/main.go Normal file
View File

@@ -0,0 +1,26 @@
package csv
import (
"encoding/csv"
"os"
"strings"
)
type Plan struct {
Menus [3][7]string
}
func Load() (Plan, error) {
f, err := os.ReadFile("./plan.csv")
if err != nil {
return Plan{}, err
}
var menus [3][7]string
records, err := csv.NewReader(strings.NewReader(string(f))).ReadAll()
for y := 0; y <= 2; y++ {
for x := 0; x <= 6; x++ {
menus[y][x] = records[y+1][x+1]
}
}
return Plan{Menus: menus}, err
}