Skip to content

Commit

Permalink
Doc: Fix usage of Use for middleware example
Browse files Browse the repository at this point in the history
  • Loading branch information
guerinoni authored and EwenQuim committed Feb 21, 2024
1 parent 682ef6a commit ea28bd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion documentation/docs/guides/middlewares.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ea28bd0

Please sign in to comment.