(w http.ResponseWriter, r *http.Request)
| 30 | } |
| 31 | |
| 32 | func (h *Handler) handleIndex(w http.ResponseWriter, r *http.Request) { |
| 33 | if r.URL.Path != "/" { |
| 34 | http.NotFound(w, r) |
| 35 | return |
| 36 | } |
| 37 | data, err := h.assets.ReadFile("public/index.html") |
| 38 | if err != nil { |
| 39 | http.NotFound(w, r) |
| 40 | return |
| 41 | } |
| 42 | w.Header().Set("Content-Type", "text/html; charset=utf-8") |
| 43 | w.Write(data) |
| 44 | } |
| 45 | |
| 46 | func (h *Handler) handleFavicon(w http.ResponseWriter, r *http.Request) { |
| 47 | data, err := h.assets.ReadFile("public/favicon.ico") |
nothing calls this directly
no outgoing calls
no test coverage detected