From 90921a9deb276bf578d717f85669c2aaa2b700e9 Mon Sep 17 00:00:00 2001 From: Tw Date: Wed, 10 Jun 2015 15:48:41 +0800 Subject: [PATCH] rename middleware's name from `internal` to `inner` The internal package has the special meaning in go (see https://golang.org/s/go14internal). So rename it to `inner`. Signed-off-by: Tw --- config/setup/internal.go | 4 ++-- middleware/{internal => inner}/internal.go | 4 ++-- middleware/{internal => inner}/internal_test.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename middleware/{internal => inner}/internal.go (96%) rename middleware/{internal => inner}/internal_test.go (98%) diff --git a/config/setup/internal.go b/config/setup/internal.go index 21ab71b6b..e83863b80 100644 --- a/config/setup/internal.go +++ b/config/setup/internal.go @@ -2,7 +2,7 @@ package setup import ( "github.com/mholt/caddy/middleware" - "github.com/mholt/caddy/middleware/internal" + "github.com/mholt/caddy/middleware/inner" ) // Internal configures a new Internal middleware instance. @@ -13,7 +13,7 @@ func Internal(c *Controller) (middleware.Middleware, error) { } return func(next middleware.Handler) middleware.Handler { - return internal.Internal{Next: next, Paths: paths} + return inner.Internal{Next: next, Paths: paths} }, nil } diff --git a/middleware/internal/internal.go b/middleware/inner/internal.go similarity index 96% rename from middleware/internal/internal.go rename to middleware/inner/internal.go index 7cb2d7826..d7f044f70 100644 --- a/middleware/internal/internal.go +++ b/middleware/inner/internal.go @@ -1,7 +1,7 @@ -// Package internal provides a simple middleware that (a) prevents access +// Package inner provides a simple middleware that (a) prevents access // to internal locations and (b) allows to return files from internal location // by setting a special header, e.g. in a proxy response. -package internal +package inner import ( "net/http" diff --git a/middleware/internal/internal_test.go b/middleware/inner/internal_test.go similarity index 98% rename from middleware/internal/internal_test.go rename to middleware/inner/internal_test.go index 392a3d173..528fd395f 100644 --- a/middleware/internal/internal_test.go +++ b/middleware/inner/internal_test.go @@ -1,4 +1,4 @@ -package internal +package inner import ( "fmt"