MCPcopy Create free account
hub / github.com/ebosas/microservices / handleHome

Function handleHome

cmd/server/server.go:64–71  ·  view source on GitHub ↗

handleHome handles the home page.

(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

62
63// handleHome handles the home page.
64func handleHome(w http.ResponseWriter, r *http.Request) {
65 if r.URL.Path != "/" {
66 handleNotFound(w)
67 return
68 }
69 t := template.Must(template.ParseFS(filesTempl, "template/template.html", "template/navbar.html", "template/home.html"))
70 t.ExecuteTemplate(w, "layout", map[string]string{"Page": "home"})
71}
72
73// handleMessages handles the messages page.
74func handleMessages(cr *redis.Client) func(w http.ResponseWriter, r *http.Request) {

Callers

nothing calls this directly

Calls 1

handleNotFoundFunction · 0.85

Tested by

no test coverage detected