mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-23 22:27:38 -05:00
Minor style nit-pick
This commit is contained in:
parent
1b7415a81b
commit
01266ece6b
1 changed files with 10 additions and 11 deletions
|
@ -17,6 +17,7 @@ import (
|
||||||
// This init function registers middleware. Register middleware
|
// This init function registers middleware. Register middleware
|
||||||
// in the order they should be executed during a request.
|
// in the order they should be executed during a request.
|
||||||
// Middleware execute in this order: A-B-C-*-C-B-A
|
// Middleware execute in this order: A-B-C-*-C-B-A
|
||||||
|
// assuming they call the Next handler in the chain.
|
||||||
func init() {
|
func init() {
|
||||||
register("gzip", gzip.New)
|
register("gzip", gzip.New)
|
||||||
register("header", headers.New)
|
register("header", headers.New)
|
||||||
|
@ -30,17 +31,15 @@ func init() {
|
||||||
register("markdown", markdown.New)
|
register("markdown", markdown.New)
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
|
||||||
// registry stores the registered middleware:
|
// registry stores the registered middleware:
|
||||||
// both the order and the directives to which they
|
// both the order and the directives to which they
|
||||||
// are bound.
|
// are bound.
|
||||||
registry = struct {
|
var registry = struct {
|
||||||
directiveMap map[string]middleware.Generator
|
directiveMap map[string]middleware.Generator
|
||||||
ordered []string
|
ordered []string
|
||||||
}{
|
}{
|
||||||
directiveMap: make(map[string]middleware.Generator),
|
directiveMap: make(map[string]middleware.Generator),
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|
||||||
// register binds a middleware generator (outer function)
|
// register binds a middleware generator (outer function)
|
||||||
// to a directive. Upon each request, middleware will be
|
// to a directive. Upon each request, middleware will be
|
||||||
|
|
Loading…
Reference in a new issue