MCPcopy Create free account
hub / github.com/mpolden/echoip / NotFoundHandler

Function NotFoundHandler

http/http.go:385–391  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

383}
384
385func NotFoundHandler(w http.ResponseWriter, r *http.Request) *appError {
386 err := notFound(nil).WithMessage("404 page not found")
387 if r.Header.Get("accept") == jsonMediaType {
388 err = err.AsJSON()
389 }
390 return err
391}
392
393func cliMatcher(r *http.Request) bool {
394 ua := useragent.Parse(r.UserAgent())

Callers 1

HandlerMethod · 0.85

Calls 4

notFoundFunction · 0.85
WithMessageMethod · 0.80
GetMethod · 0.80
AsJSONMethod · 0.80

Tested by

no test coverage detected