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

Function ClearHandler

context.go:134–139  ·  view source on GitHub ↗

ClearHandler wraps an http.Handler and clears request values at the end of a request lifetime.

(h http.Handler)

Source from the content-addressed store, hash-verified

132// ClearHandler wraps an http.Handler and clears request values at the end
133// of a request lifetime.
134func ClearHandler(h http.Handler) http.Handler {
135 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
136 defer Clear(r)
137 h.ServeHTTP(w, r)
138 })
139}

Callers

nothing calls this directly

Calls 1

ClearFunction · 0.85

Tested by

no test coverage detected