MCPcopy Create free account
hub / github.com/gorilla/context / Delete

Function Delete

context.go:79–85  ·  view source on GitHub ↗

Delete removes a value stored for a given key in a given request.

(r *http.Request, key interface{})

Source from the content-addressed store, hash-verified

77
78// Delete removes a value stored for a given key in a given request.
79func Delete(r *http.Request, key interface{}) {
80 mutex.Lock()
81 if data[r] != nil {
82 delete(data[r], key)
83 }
84 mutex.Unlock()
85}
86
87// Clear removes all values stored for a given request.
88//

Callers 1

TestContextFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestContextFunction · 0.68