vestigo icon indicating copy to clipboard operation
vestigo copied to clipboard

implement context.Context

Open donseba opened this issue 8 years ago • 6 comments

Little "question about" or "request for" context.Context I know it is something vestigo is not, and probably will implement.

Since you have studied and written about the mainstream mux/routing tools in golang I'd like to know how to implement golang's context.Context or something similar into Vestigo..

This article is pretty clear on how to do it with the default http.Handler but i think it is not very idiomatic.

Would it be possible to do something like goji does ? And limit it to

  • func(http.ResponseWriter, *http.Request)
  • func(context.Context, http.ResponseWriter, *http.Request)

I have no idea if and how it would influence the performance.

donseba avatar Mar 17 '16 08:03 donseba