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

Method Get

context.go:458–464  ·  view source on GitHub ↗

Get retrieves data from the context. Method returns any(nil) when key does not exist which is different from typed nil (eg. []byte(nil)).

(key string)

Source from the content-addressed store, hash-verified

456// Get retrieves data from the context.
457// Method returns any(nil) when key does not exist which is different from typed nil (eg. []byte(nil)).
458func (c *Context) Get(key string) any {
459 // Unlock without defer to avoid the deferred-call overhead on this hot path.
460 c.lock.RLock()
461 v := c.store[key]
462 c.lock.RUnlock()
463 return v
464}
465
466// Set saves data in the context.
467func (c *Context) Set(key string, val any) {

Calls

no outgoing calls