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

Function GetAll

context.go:51–63  ·  view source on GitHub ↗

GetAll returns all stored values for the request as a map. Nil is returned for invalid requests.

(r *http.Request)

Source from the content-addressed store, hash-verified

49
50// GetAll returns all stored values for the request as a map. Nil is returned for invalid requests.
51func GetAll(r *http.Request) map[interface{}]interface{} {
52 mutex.RLock()
53 if context, ok := data[r]; ok {
54 result := make(map[interface{}]interface{}, len(context))
55 for k, v := range context {
56 result[k] = v
57 }
58 mutex.RUnlock()
59 return result
60 }
61 mutex.RUnlock()
62 return nil
63}
64
65// GetAllOk returns all stored values for the request as a map and a boolean value that indicates if
66// the request was registered.

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…