adding cakes 50% working

This commit is contained in:
Bronku 2025-01-31 22:56:21 +01:00
parent a09cee09c8
commit cd7c9a9d0c
8 changed files with 57 additions and 38 deletions

View file

@ -19,6 +19,10 @@ func main() {
var c controller
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}
err := http.ListenAndServe(":8080", c)
if err != nil {