cake-order-tracker/controller/cake.go
2025-01-29 19:04:08 +01:00

14 lines
318 B
Go

package controller
import (
"net/http"
)
func (c *Controller) cakeOptions(w http.ResponseWriter, _ *http.Request) {
type cake struct {
Name string
ID int
}
//w.Header().Set("Content-Type", "text/html")
c.tmpl["cake/options"].Execute(w, struct{ Cakes []cake }{Cakes: []cake{{"Hello", 1}, {"World", 2}}})
}