MCPcopy
hub / github.com/gin-gonic/gin / Delete

Method Delete

context.go:482–488  ·  view source on GitHub ↗

Delete deletes the key from the Context's Key map, if it exists. This operation is safe to be used by concurrent go-routines

(key any)

Source from the content-addressed store, hash-verified

480// Delete deletes the key from the Context's Key map, if it exists.
481// This operation is safe to be used by concurrent go-routines
482func (c *Context) Delete(key any) {
483 c.mu.Lock()
484 defer c.mu.Unlock()
485 if c.Keys != nil {
486 delete(c.Keys, key)
487 }
488}
489
490/************************************/
491/************ INPUT DATA ************/

Callers 1

TestSetGetDeleteFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestSetGetDeleteFunction · 0.64