You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This can be used to render your own 404 Not Found errors.
126
135
func (s*Server) NotFound(handler http.Handler) {
@@ -138,6 +147,12 @@ func (s *Server) Renderer(renderer Renderer) {
138
147
s.renderer=renderer
139
148
}
140
149
150
+
// Use appends a MiddlewareFunc to the chain.
151
+
// Middleware can be used to intercept or otherwise modify requests and/or responses, and are executed in the order that they are applied to the Router.
152
+
func (s*Server) Use(mwf...MiddlewareFunc) {
153
+
s.router.Use(mwf...)
154
+
}
155
+
141
156
// Match attempts to match the given request against the router's registered routes.
142
157
//
143
158
// If the request matches a route of this router or one of its subrouters the Route,
0 commit comments