diff --git a/caddyhttp/basicauth/basicauth_test.go b/caddyhttp/basicauth/basicauth_test.go index be49d3e36..71255f763 100644 --- a/caddyhttp/basicauth/basicauth_test.go +++ b/caddyhttp/basicauth/basicauth_test.go @@ -171,7 +171,7 @@ md5:$apr1$l42y8rex$pOA2VJ0x/0TwaFeAF9nX61` htfh, err := ioutil.TempFile("", "basicauth-") if err != nil { - t.Skipf("Error creating temp file (%v), will skip htpassword test") + t.Skip("Error creating temp file, will skip htpassword test") return } defer os.Remove(htfh.Name()) diff --git a/plugins.go b/plugins.go index 06a73567b..f66b8baea 100644 --- a/plugins.go +++ b/plugins.go @@ -66,7 +66,7 @@ func DescribePlugins() string { str += " " + name + "\n" } - if len(eventHooks) > 0 { + if len(pl["event_hooks"]) > 0 { str += "\nEvent hook plugins:\n" for _, name := range pl["event_hooks"] { str += " hook." + name + "\n" @@ -100,15 +100,10 @@ func ListPlugins() map[string][]string { } // List the event hook plugins - hooks := "" eventHooks.Range(func(k, _ interface{}) bool { - hooks += " hook." + k.(string) + "\n" + p["event_hooks"] = append(p["event_hooks"], k.(string)) return true }) - if hooks != "" { - str += "\nEvent hook plugins:\n" - str += hooks - } // alphabetize the rest of the plugins var others []string