Browse Source

Update doc.go: r.AddMiddleware(...) -> r.Use(...)

pull/332/head
Kamil Kisiel 8 years ago committed by GitHub
parent
commit
85e6bfff1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      doc.go

2
doc.go

@ -261,7 +261,7 @@ Middlewares can be added to a router using `Router.Use()`: @@ -261,7 +261,7 @@ Middlewares can be added to a router using `Router.Use()`:
r := mux.NewRouter()
r.HandleFunc("/", handler)
r.AddMiddleware(simpleMw)
r.Use(simpleMw)
A more complex authentication middleware, which maps session token to users, could be written as:

Loading…
Cancel
Save