diff --git a/config/middleware.go b/config/middleware.go index 589f1030..b6f57bd4 100644 --- a/config/middleware.go +++ b/config/middleware.go @@ -4,7 +4,7 @@ import ( "github.com/mholt/caddy/middleware" "github.com/mholt/caddy/middleware/browse" "github.com/mholt/caddy/middleware/errors" - "github.com/mholt/caddy/middleware/extension" + "github.com/mholt/caddy/middleware/extensions" "github.com/mholt/caddy/middleware/fastcgi" "github.com/mholt/caddy/middleware/gzip" "github.com/mholt/caddy/middleware/headers" @@ -43,7 +43,7 @@ func init() { register("header", headers.New) register("rewrite", rewrite.New) register("redir", redirect.New) - register("ext", extension.New) + register("ext", extensions.New) register("proxy", proxy.New) register("fastcgi", fastcgi.New) register("websocket", websockets.New) diff --git a/middleware/extension/ext.go b/middleware/extensions/ext.go similarity index 99% rename from middleware/extension/ext.go rename to middleware/extensions/ext.go index 959f22d2..006ba07a 100644 --- a/middleware/extension/ext.go +++ b/middleware/extensions/ext.go @@ -3,7 +3,7 @@ // internally for paths requested that don't match an existing // resource. The first path+ext combination that matches a valid // file will be used. -package extension +package extensions import ( "net/http" diff --git a/middleware/path.go b/middleware/path.go index 4ddc6f9d..c165ce8e 100644 --- a/middleware/path.go +++ b/middleware/path.go @@ -7,7 +7,7 @@ type Path string // Path matching will probably not always be a direct // comparison; this method assures that paths can be -// easily matched. +// easily and consistently matched. func (p Path) Matches(other string) bool { return strings.HasPrefix(string(p), other) }