Skip to content

Flexible Handle Type #39

Description

@rkusa

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions