From 6cabc9bfe3dc5f06c49aa8fb58ac19a09a4f42e9 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Tue, 28 Mar 2017 15:19:29 +0100 Subject: [PATCH] Add Event Hook plugins to DescribePlugins function (#1540) * Add Event Hook plugins to DescribePlugins function * Update plugins.go * Update plugins.go --- plugins.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins.go b/plugins.go index c6d52518f..667a8813d 100644 --- a/plugins.go +++ b/plugins.go @@ -53,6 +53,14 @@ func DescribePlugins() string { str += " " + defaultCaddyfileLoader.name + "\n" } + if len(eventHooks) > 0 { + // List the event hook plugins + str += "\nEvent hook plugins:\n" + for hookPlugin := range eventHooks { + str += " hook." + hookPlugin + "\n" + } + } + // Let's alphabetize the rest of these... var others []string for stype, stypePlugins := range plugins { @@ -65,6 +73,7 @@ func DescribePlugins() string { others = append(others, s) } } + sort.Strings(others) str += "\nOther plugins:\n" for _, name := range others {