move id to cake struct

This commit is contained in:
Bronku 2025-02-01 07:29:24 +01:00
parent cd7c9a9d0c
commit 7515010afd
8 changed files with 20 additions and 29 deletions

View file

@ -20,9 +20,9 @@ func main() {
c.tmpl = LoadTemplates(templates)
c.LoadRouter(public)
c.cakes = make(map[int]Cake)
c.cakes[0] = Cake{"Sernik", 120}
c.cakes[1] = Cake{"Malinowa chmórka", 120}
c.cakes[2] = Cake{"Beza Pavlova", 8}
c.cakes[0] = Cake{"Sernik", 120, 0}
c.cakes[1] = Cake{"Malinowa chmórka", 120, 1}
c.cakes[2] = Cake{"Beza Pavlova", 8, 2}
err := http.ListenAndServe(":8080", c)
if err != nil {