move id to cake struct
This commit is contained in:
parent
cd7c9a9d0c
commit
7515010afd
8 changed files with 20 additions and 29 deletions
6
main.go
6
main.go
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue