MCPcopy
hub / github.com/usefathom/fathom / NotFoundHandler

Function NotFoundHandler

pkg/api/http.go:76–82  ·  view source on GitHub ↗
(box *packr.Box)

Source from the content-addressed store, hash-verified

74}
75
76func NotFoundHandler(box *packr.Box) http.Handler {
77 return HandlerFunc(func(w http.ResponseWriter, r *http.Request) error {
78 w.WriteHeader(http.StatusNotFound)
79 w.Write(box.Bytes("404.html"))
80 return nil
81 })
82}

Callers 1

RoutesMethod · 0.85

Calls 1

HandlerFuncFunction · 0.85

Tested by

no test coverage detected