gorilla/mux — pull request #5 by surma (2012-12-09 16:24:45+00:00)
Title: Remove side effects of Router

Sometimes I uses cascades of muxers to keep code modules decoupled (e.g. a stand-alone OAuth module, which is an `http.Handler` and uses Gorilla's `Router` internally, but is sometimes attached to an existing `Router`).

I have encountered situations, though, in which I share `context` across these cascaded routers. (I put a [small, constructed example](https://gist.github.com/4245799) in a gist).

My proposal for solving this is this pull request, in which you can define wether a `Router` will wipe the request's context once it has finished routing. The new property `KeepContext` is propagated to subrouters.

I am, however, open to other/better solutions to this problem ;)