MCPcopy Create free account
hub / github.com/felixge/httpsnoop / Unwrap

Function Unwrap

wrap_generated.go:16173–16179  ·  view source on GitHub ↗

Unwrap returns the underlying http.ResponseWriter from within zero or more layers of httpsnoop wrappers.

(w http.ResponseWriter)

Source from the content-addressed store, hash-verified

16171// Unwrap returns the underlying http.ResponseWriter from within zero or more
16172// layers of httpsnoop wrappers.
16173func Unwrap(w http.ResponseWriter) http.ResponseWriter {
16174 if rw, ok := w.(Unwrapper); ok {
16175 // recurse until rw.Unwrap() returns a non-Unwrapper
16176 return Unwrap(rw.Unwrap())
16177 }
16178 return w
16179}

Callers 3

TestUnwrapFunction · 0.85
TestUnwrapWithoutWrapFunction · 0.85
TestUnwrapMultipleLayersFunction · 0.85

Calls 1

UnwrapMethod · 0.65

Tested by 3

TestUnwrapFunction · 0.68
TestUnwrapWithoutWrapFunction · 0.68
TestUnwrapMultipleLayersFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…