clarify httpserver.Middleware

Matt Holt 2016-06-07 12:44:05 -06:00
parent 493bf501b1
commit b3dbd6c997

@ -87,7 +87,7 @@ To test that the middleware was set up properly, you'll need to get the config i
```go ```go
cfg := httpserver.GetConfig("") cfg := httpserver.GetConfig("")
mids := cfg.Middleware() // []Middleware mids := cfg.Middleware() // []httpserver.Middleware
``` ```
From there, you'll usually want the last middleware in the list, `mids[len(mids)-1]`. If you're not in a loop you can just assume `mids[0]`. Of course, if you didn't add any middleware, you can omit these checks. From there, you'll usually want the last middleware in the list, `mids[len(mids)-1]`. If you're not in a loop you can just assume `mids[0]`. Of course, if you didn't add any middleware, you can omit these checks.