diff options
author | Ethel Morgan <eth@ethulhu.co.uk> | 2020-07-07 18:21:28 +0100 |
---|---|---|
committer | Ethel Morgan <eth@ethulhu.co.uk> | 2020-07-07 18:21:28 +0100 |
commit | d569667ac12de341f730453b1b173901291f32da (patch) | |
tree | d468e9e253d03d7027558cafae0b332cf926f74c | |
parent | 268a9deb94231b81e91f28da5658b4330953a3cf (diff) |
add NotFoundHandler, wrapping NotFoundv0.0.4
Diffstat (limited to '')
-rw-r--r-- | handlers.go | 4 |
1 files changed, 4 insertions, 0 deletions
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) |