From ea28bd0edfc4c55174ef297d561524a8f4467af4 Mon Sep 17 00:00:00 2001 From: Federico Guerinoni Date: Wed, 21 Feb 2024 00:15:22 +0100 Subject: [PATCH] Doc: Fix usage of `Use` for middleware example --- documentation/docs/guides/middlewares.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/docs/guides/middlewares.md b/documentation/docs/guides/middlewares.md index e493b511..02dc4f2e 100644 --- a/documentation/docs/guides/middlewares.md +++ b/documentation/docs/guides/middlewares.md @@ -22,7 +22,7 @@ func main() { s := fuego.NewServer() // Add a middleware to the whole server - s.Use(func(next http.Handler) http.Handler { + fuego.Use(func(s, next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { // Do something before the request next.ServeHTTP(w, r)