diff --git a/ctx.go b/ctx.go index dd55ad97..1816185e 100644 --- a/ctx.go +++ b/ctx.go @@ -1947,7 +1947,7 @@ func (c *DefaultCtx) getBody() []byte { } // Methods to use with next stack. -func (c *DefaultCtx) getMethodINT() int { +func (c *DefaultCtx) getMethodInt() int { return c.methodInt } diff --git a/ctx_interface.go b/ctx_interface.go index 6ef33847..c2eb8bf4 100644 --- a/ctx_interface.go +++ b/ctx_interface.go @@ -17,7 +17,7 @@ type CustomCtx interface { Reset(fctx *fasthttp.RequestCtx) // Methods to use with next stack. - getMethodINT() int + getMethodInt() int getIndexRoute() int getTreePathHash() int getDetectionPath() string diff --git a/ctx_interface_gen.go b/ctx_interface_gen.go index a4d7db3d..df537e26 100644 --- a/ctx_interface_gen.go +++ b/ctx_interface_gen.go @@ -345,7 +345,7 @@ type Ctx interface { release() getBody() []byte // Methods to use with next stack. - getMethodINT() int + getMethodInt() int getIndexRoute() int getTreePathHash() int getDetectionPath() string diff --git a/helpers.go b/helpers.go index bbaa1805..573aab3d 100644 --- a/helpers.go +++ b/helpers.go @@ -108,7 +108,7 @@ func (app *App) methodExist(c *DefaultCtx) bool { methods := app.config.RequestMethods for i := 0; i < len(methods); i++ { // Skip original method - if c.getMethodINT() == i { + if c.getMethodInt() == i { continue } // Reset stack index @@ -152,7 +152,7 @@ func (app *App) methodExistCustom(c CustomCtx) bool { methods := app.config.RequestMethods for i := 0; i < len(methods); i++ { // Skip original method - if c.getMethodINT() == i { + if c.getMethodInt() == i { continue } // Reset stack index diff --git a/router.go b/router.go index 0fc9b455..ac5832bc 100644 --- a/router.go +++ b/router.go @@ -110,9 +110,9 @@ func (r *Route) match(detectionPath, path string, params *[maxParams]string) boo func (app *App) nextCustom(c CustomCtx) (bool, error) { //nolint:unparam // bool param might be useful for testing // Get stack length - tree, ok := app.treeStack[c.getMethodINT()][c.getTreePathHash()] + tree, ok := app.treeStack[c.getMethodInt()][c.getTreePathHash()] if !ok { - tree = app.treeStack[c.getMethodINT()][0] + tree = app.treeStack[c.getMethodInt()][0] } lenr := len(tree) - 1