WithParam returns a new context with param p set to v.
(ctx context.Context, p, v string)
| 33 | |
| 34 | // WithParam returns a new context with param p set to v. |
| 35 | func WithParam(ctx context.Context, p, v string) context.Context { |
| 36 | return context.WithValue(ctx, param(p), v) |
| 37 | } |
| 38 | |
| 39 | // Router wraps httprouter.Router and adds support for prefixed sub-routers, |
| 40 | // per-request context injections and instrumentation. |