Unwrap returns the underlying http.ResponseWriter from within zero or more layers of httpsnoop wrappers.
(w http.ResponseWriter)
| 16171 | // Unwrap returns the underlying http.ResponseWriter from within zero or more |
| 16172 | // layers of httpsnoop wrappers. |
| 16173 | func 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 | } |
searching dependent graphs…