aboutsummaryrefslogtreecommitdiff
path: root/plugin/autopath
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/autopath')
-rw-r--r--plugin/autopath/autopath.go2
-rw-r--r--plugin/autopath/setup.go6
-rw-r--r--plugin/autopath/setup_test.go2
3 files changed, 5 insertions, 5 deletions
diff --git a/plugin/autopath/autopath.go b/plugin/autopath/autopath.go
index 5c804a040..aa3d44e6a 100644
--- a/plugin/autopath/autopath.go
+++ b/plugin/autopath/autopath.go
@@ -25,7 +25,7 @@ autopath.Func. Note the searchpath must be ending with the empty string.
I.e:
-func (m Middleware ) AutoPath(state request.Request) []string {
+func (m Plugins ) AutoPath(state request.Request) []string {
return []string{"first", "second", "last", ""}
}
*/
diff --git a/plugin/autopath/setup.go b/plugin/autopath/setup.go
index c83912a63..c5a39a870 100644
--- a/plugin/autopath/setup.go
+++ b/plugin/autopath/setup.go
@@ -49,8 +49,8 @@ func setup(c *caddy.Controller) error {
return nil
}
-// allowedMiddleware has a list of plugin that can be used by autopath.
-var allowedMiddleware = map[string]bool{
+// allowedPlugins has a list of plugin that can be used by autopath.
+var allowedPlugins = map[string]bool{
"@kubernetes": true,
"@erratic": true,
}
@@ -66,7 +66,7 @@ func autoPathParse(c *caddy.Controller) (*AutoPath, string, error) {
}
resolv := zoneAndresolv[len(zoneAndresolv)-1]
if resolv[0] == '@' {
- _, ok := allowedMiddleware[resolv]
+ _, ok := allowedPlugins[resolv]
if ok {
mw = resolv[1:]
}
diff --git a/plugin/autopath/setup_test.go b/plugin/autopath/setup_test.go
index 3e13aa74f..530036934 100644
--- a/plugin/autopath/setup_test.go
+++ b/plugin/autopath/setup_test.go
@@ -55,7 +55,7 @@ func TestSetupAutoPath(t *testing.T) {
}
if !test.shouldErr && mw != test.expectedMw {
- t.Errorf("Test %d, Middleware not correctly set for input %s. Expected: %s, actual: %s", i, test.input, test.expectedMw, mw)
+ t.Errorf("Test %d, Plugin not correctly set for input %s. Expected: %s, actual: %s", i, test.input, test.expectedMw, mw)
}
if !test.shouldErr && ap.search != nil {
if !reflect.DeepEqual(test.expectedSearch, ap.search) {