Get returns the value for the given key, ie: (value, true). If the value does not exist it returns (nil, false)
(key any)
| 286 | // Get returns the value for the given key, ie: (value, true). |
| 287 | // If the value does not exist it returns (nil, false) |
| 288 | func (c *Context) Get(key any) (value any, exists bool) { |
| 289 | c.mu.RLock() |
| 290 | defer c.mu.RUnlock() |
| 291 | value, exists = c.Keys[key] |
| 292 | return |
| 293 | } |
| 294 | |
| 295 | // MustGet returns the value for the given key if it exists, otherwise it panics. |
| 296 | func (c *Context) MustGet(key any) any { |
no outgoing calls