(u *auth.User)
| 149 | } |
| 150 | |
| 151 | func mockAuthMiddleware(u *auth.User) func(http.Handler) http.Handler { |
| 152 | return func(next http.Handler) http.Handler { |
| 153 | return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| 154 | if u != nil { |
| 155 | r = r.WithContext(httpmiddlewares.AuthenticatedUserToContext(r.Context(), u)) |
| 156 | } |
| 157 | next.ServeHTTP(w, r) |
| 158 | }) |
| 159 | } |
| 160 | } |
no outgoing calls
no test coverage detected