On 2017-04-16 19:56, Peter Mogensen wrote:


On 2017-04-16 19:52, Dragos Harabor wrote:
Take a look at https://github.com/pressly/chi

Yeah... I actually took a very long look at it, but AFAICS it doesn't
support custom methods.
I could of course just use the any-method Handle() call and do the
method logic in the individual handler, but I kinda like the
self-documentation of having the HTTP method mentioned along with the
declaration of the route tree.

... and the value of routing paramters are type string.
I can see a lot of routing packages do this, but I think I would like to attach more general objects to the routing context... like a "Credentials" interface.

I wonder why so many routing packages use map[string]string for KV data in routing context. One could of course fall back to context.Context (with value), but then ... nesting many context.WithValue would probably be much more expensive.

/Peter

--
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to