Store vars and route in context.Context when go1.7+ is used#169
Store vars and route in context.Context when go1.7+ is used#169kisielk merged 2 commits intogorilla:masterfrom
Conversation
|
This LGTM! If @kisielk is happy with the PR as well we can merge. |
|
I was actually thinking of doing that this weekend, but I guess you beat me to it ! The implementation looks great to me, very elegant. The only thing I can think of it breaking is people who were manually extracting route vars via the gorilla/context package, but nobody should be doing that... |
|
Yeah, that was explicitly for this reason, so we could change the context
|
|
👍 Was thinking of doing this. |
Fixes #168
This should be backwards compatible, since the usage of gorilla/context was an implementation detail and not exposed publicly.
When go1.7+ is used, the native context.Context object on the http.Request will be used. On older version of go, gorilla/context will be used.