What do you think about making the Lookup method (or a similar one) more generic in terms of not enforcing a specific function footprint?
Currently, when building something on top of httprouter, each handler has to be a func(w http.ResponseWriter, r *http.Request, _ httprouter.Params). It would be nice if the Lookup method (or a similar one) returns an interface{}, while httprouter itself still enforces the httprouter.Handle type for its own public API. This would allow using custom handle types for modules build on top of httprouter.
What do you think about making the
Lookupmethod (or a similar one) more generic in terms of not enforcing a specific function footprint?Currently, when building something on top of
httprouter, each handler has to be afunc(w http.ResponseWriter, r *http.Request, _ httprouter.Params). It would be nice if theLookupmethod (or a similar one) returns aninterface{}, whilehttprouteritself still enforces thehttprouter.Handletype for its own public API. This would allow using custom handle types for modules build on top ofhttprouter.