Moved controller into its own file; other minor cleanups

This commit is contained in:
Matthew Holt
2015-01-31 10:15:17 -07:00
parent 16997d85eb
commit 5ae1790e52
5 changed files with 110 additions and 65 deletions

View File

@ -15,10 +15,6 @@ func New(c middleware.Controller) (middleware.Middleware, error) {
}
return func(next http.HandlerFunc) http.HandlerFunc {
head := Headers{
Next: next,
Rules: rules,
}
return head.ServeHTTP
return Headers{Next: next, Rules: rules}.ServeHTTP
}, nil
}