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

Function Clear

context.go:91–95  ·  view source on GitHub ↗

Clear removes all values stored for a given request. This is usually called by a handler wrapper to clean up request variables at the end of a request lifetime. See ClearHandler().

(r *http.Request)

Source from the content-addressed store, hash-verified

89// This is usually called by a handler wrapper to clean up request
90// variables at the end of a request lifetime. See ClearHandler().
91func Clear(r *http.Request) {
92 mutex.Lock()
93 clear(r)
94 mutex.Unlock()
95}
96
97// clear is Clear without the lock.
98func clear(r *http.Request) {

Callers 2

TestContextFunction · 0.85
ClearHandlerFunction · 0.85

Calls 1

clearFunction · 0.85

Tested by 1

TestContextFunction · 0.68