From 3cf0d013e53d62a96c096366d300c84489c26dd5 Mon Sep 17 00:00:00 2001 From: Jille Timmermans Date: Tue, 14 Sep 2021 14:12:19 +0200 Subject: [PATCH] Include "404" and "405" in the docs (#602) --- mux.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mux.go b/mux.go index 782a34b2..f126a602 100644 --- a/mux.go +++ b/mux.go @@ -46,9 +46,11 @@ func NewRouter() *Router { // This will send all incoming requests to the router. type Router struct { // Configurable Handler to be used when no route matches. + // This can be used to render your own 404 Not Found errors. NotFoundHandler http.Handler // Configurable Handler to be used when the request method does not match the route. + // This can be used to render your own 405 Method Not Allowed errors. MethodNotAllowedHandler http.Handler // Routes to be matched, in order.