From d569667ac12de341f730453b1b173901291f32da Mon Sep 17 00:00:00 2001 From: Ethel Morgan Date: Tue, 7 Jul 2020 18:21:28 +0100 Subject: add NotFoundHandler, wrapping NotFound --- handlers.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'handlers.go') diff --git a/handlers.go b/handlers.go index c32fdbd..39151cd 100644 --- a/handlers.go +++ b/handlers.go @@ -8,6 +8,10 @@ import ( "net/http" ) +var ( + NotFoundHandler = http.HandlerFunc(NotFound) +) + // NotFound is an HTTP NotFound handler that returns an informative message. func NotFound(w http.ResponseWriter, r *http.Request) { msg := fmt.Sprintf("not found: %v %v %v", r.Method, r.URL, r.Form) -- cgit v1.2.3