Skip to content

Commit 3cf0d01

Browse files
authored
Include "404" and "405" in the docs (#602)
1 parent d07530f commit 3cf0d01

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: mux.go

+2
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ func NewRouter() *Router {
4646
// This will send all incoming requests to the router.
4747
type Router struct {
4848
// Configurable Handler to be used when no route matches.
49+
// This can be used to render your own 404 Not Found errors.
4950
NotFoundHandler http.Handler
5051

5152
// Configurable Handler to be used when the request method does not match the route.
53+
// This can be used to render your own 405 Method Not Allowed errors.
5254
MethodNotAllowedHandler http.Handler
5355

5456
// Routes to be matched, in order.

0 commit comments

Comments
 (0)