MCPcopy
hub / github.com/labstack/echo / Set

Method Set

context.go:467–474  ·  view source on GitHub ↗

Set saves data in the context.

(key string, val any)

Source from the content-addressed store, hash-verified

465
466// Set saves data in the context.
467func (c *Context) Set(key string, val any) {
468 c.lock.Lock()
469 if c.store == nil {
470 c.store = make(map[string]any)
471 }
472 c.store[key] = val
473 c.lock.Unlock()
474}
475
476// Bind binds path params, query params and the request body into provided type `i`. The default binder
477// binds body based on Content-Type header.

Callers 15

BenchmarkContext_StoreFunction · 0.95
TestContextGetOKFunction · 0.95
TestContextGetOrOKFunction · 0.95
BenchmarkContext_GetSetFunction · 0.95
router.goFile · 0.80

Calls

no outgoing calls

Tested by 15

BenchmarkContext_StoreFunction · 0.76
TestContextGetOKFunction · 0.76
TestContextGetOrOKFunction · 0.76
BenchmarkContext_GetSetFunction · 0.76
TestContextFormValueFunction · 0.64