From 9f6393c64cd8dc969358d47fb96410d8ee5c063d Mon Sep 17 00:00:00 2001 From: peymaneh <80954461+pymnh@users.noreply.github.com> Date: Thu, 2 Sep 2021 02:08:02 +0200 Subject: cmd: export CaddyVersion(), Commands() (#4316) * cmd: Export CaddyVersion() * cmd: Add getter Commands() --- cmd/commands.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmd/commands.go') diff --git a/cmd/commands.go b/cmd/commands.go index 89c4fe4..ccb82b1 100644 --- a/cmd/commands.go +++ b/cmd/commands.go @@ -61,6 +61,12 @@ type Command struct { // any error that occurred. type CommandFunc func(Flags) (int, error) +// Commands returns a list of commands initialised by +// RegisterCommand +func Commands() map[string]Command { + return commands +} + var commands = make(map[string]Command) func init() { -- cgit v1.2.3