codegangsta/negroni — pull request #31 by djbk (2014-07-06 20:00:33+00:00)
Title: Change data structure to queue and overload the Use method to take http....

...Handler and negroni.Handler

I made a fairly big change as it started out as a fork to make a personal project rather than a contribution. But I figured since I learned a lot from this project, I thought it would be nice to share my take. Also, I'm not 100% confident about integration tests with other modules like NewResponseWriter, but it passed the current tests with flying colors.

A couple of things to note:

Use() will now take either http.Handler or negroni.Handler objects.
Use()'s performance is now O(1) compared to the previous O(N)
There's also no more overhead keeping an array as well as a linked list.