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

Function GetAllOk

context.go:67–76  ·  view source on GitHub ↗

GetAllOk returns all stored values for the request as a map and a boolean value that indicates if the request was registered.

(r *http.Request)

Source from the content-addressed store, hash-verified

65// GetAllOk returns all stored values for the request as a map and a boolean value that indicates if
66// the request was registered.
67func GetAllOk(r *http.Request) (map[interface{}]interface{}, bool) {
68 mutex.RLock()
69 context, ok := data[r]
70 result := make(map[interface{}]interface{}, len(context))
71 for k, v := range context {
72 result[k] = v
73 }
74 mutex.RUnlock()
75 return result, ok
76}
77
78// Delete removes a value stored for a given key in a given request.
79func Delete(r *http.Request, key interface{}) {

Callers 1

TestContextFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestContextFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…