(w http.ResponseWriter, r *http.Request)
| 383 | } |
| 384 | |
| 385 | func 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 | |
| 393 | func cliMatcher(r *http.Request) bool { |
| 394 | ua := useragent.Parse(r.UserAgent()) |
no test coverage detected