From 9b0895445d50daaeb19dd675b606ad58f6a58b4d Mon Sep 17 00:00:00 2001 From: rocketlaunchr-cto Date: Fri, 7 Oct 2022 12:47:11 +1100 Subject: [PATCH] - update Locals function to accept interface{} key (Requires new version of fasthttp) --- ctx.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ctx.go b/ctx.go index b5bc5f0153..661cfa7895 100644 --- a/ctx.go +++ b/ctx.go @@ -848,9 +848,9 @@ func (c *Ctx) Links(link ...string) { bytebufferpool.Put(bb) } -// Locals makes it possible to pass interface{} values under string keys scoped to the request +// Locals makes it possible to pass interface{} values under keys scoped to the request // and therefore available to all following routes that match the request. -func (c *Ctx) Locals(key string, value ...interface{}) (val interface{}) { +func (c *Ctx) Locals(key interface{}, value ...interface{}) (val interface{}) { if len(value) == 0 { return c.fasthttp.UserValue(key) }