We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c9510d commit 232c0faCopy full SHA for 232c0fa
ctx.go
@@ -967,6 +967,10 @@ func (c *Ctx) Links(link ...string) {
967
968
// Locals makes it possible to pass interface{} values under keys scoped to the request
969
// and therefore available to all following routes that match the request.
970
+//
971
+// All the values are removed from ctx after returning from the top
972
+// RequestHandler. Additionally, Close method is called on each value
973
+// implementing io.Closer before removing the value from ctx.
974
func (c *Ctx) Locals(key interface{}, value ...interface{}) interface{} {
975
if len(value) == 0 {
976
return c.fasthttp.UserValue(key)
0 commit comments