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

This commit is contained in:
Kamil Kisiel
2018-01-16 17:18:53 -08:00
committed by GitHub
parent 0b74e3d0fe
commit 85e6bfff1a

2
doc.go
View File

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