ExcludePaths adds new URL paths to be ignored during logging. The URL u is parsed, hence the returned error
(paths ...string)
| 94 | |
| 95 | // ExcludePaths adds new URL paths to be ignored during logging. The URL u is parsed, hence the returned error |
| 96 | func (m *Middleware) ExcludePaths(paths ...string) *Middleware { |
| 97 | for _, path := range paths { |
| 98 | m.Lock() |
| 99 | m.silencePaths[path] = true |
| 100 | m.Unlock() |
| 101 | } |
| 102 | return m |
| 103 | } |
| 104 | |
| 105 | func (m *Middleware) Wrap(handler http.Handler) http.Handler { |
| 106 | return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { |
no outgoing calls
no test coverage detected