routes
routes copied to clipboard
Added a new optional method that allows you to easily handle all the unregistered (404) routes.
Added a new optional method that allows you to handle all the unregistered (404) routes.
For example:
mux := routes.New()
mux.Get("/", handleHome)
mux.Get("/profile/:username([a-zA-Z0-9]+)", handleUserProfile)
mux.NotFound(handle404)
...
Also updated the documention (readme).
add tests for your change in routes_test.go
Sorry. I ended up using https://github.com/gorilla/mux instead. So i'm unlikely to update this patch going forward. Sorry.