File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ type handlerFunc func(ctx *Context) error
1212
1313type Context struct {
1414 RequestCtx * fasthttp.RequestCtx
15- params map [string ]string
15+ Params map [string ]string
1616 paramValues []string
1717 handlers []handlerFunc
1818 handlerIdx int
@@ -36,7 +36,7 @@ type Cookie struct {
3636func NewContext (ctx * fasthttp.RequestCtx , params map [string ]string ) * Context {
3737 return & Context {
3838 RequestCtx : ctx ,
39- params : params ,
39+ Params : params ,
4040 paramValues : make ([]string , 0 , 10 ),
4141 handlers : nil ,
4242 handlerIdx : - 1 ,
@@ -50,13 +50,13 @@ func (c *Context) Context() *fasthttp.RequestCtx {
5050
5151// WithParams sets the params for the context.
5252func (c * Context ) WithParams (params map [string ]string ) * Context {
53- c .params = params
53+ c .Params = params
5454 return c
5555}
5656
5757// Param returns the param value for the given key.
5858func (c * Context ) Param (key string ) string {
59- return c .params [key ]
59+ return c .Params [key ]
6060}
6161
6262// Query returns the query value for the given key.
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ func (r *Router) find(method, path string) []Handler {
6363 for _ , route := range routes {
6464 if matches , params := route .match (path ); matches {
6565 c := NewContext (nil , nil )
66- c .params = params
66+ c .Params = params
6767 return r .applyMiddleware (route .Handlers , method )
6868 }
6969 }
You can’t perform that action at this time.
0 commit comments