H
On Friday, September 2, 2016 at 12:39:16 PM UTC-7, kevin.nor...@gmail.com
wrote:
>
> If I understand correctly using Context will allow "middleware" to pass
> data into the handler? Can someone provide a simple example please.
>
>
>
>
--
You received this message because you are subscribed
Here is an example:
https://play.golang.org/p/3mFS_7-mM8
You have two wrapper handlers (logIt and authIt). authIt, authenticates
every handler you want to authenticate. For simplicity it takes a user id
from a url and checks roles.
logIt is another wrapper handler, that logs every handler and it