summaryrefslogtreecommitdiff
path: root/cmd/commands.go
diff options
context:
space:
mode:
authorpeymaneh <80954461+pymnh@users.noreply.github.com>2021-09-02 02:08:02 +0200
committerGitHub <noreply@github.com>2021-09-01 18:08:02 -0600
commit9f6393c64cd8dc969358d47fb96410d8ee5c063d (patch)
treea00f8c3bc756cf82d26ca129cf0b76d78fabfac8 /cmd/commands.go
parent105dac8c2a3e48ed3957a606322015138752efd2 (diff)
cmd: export CaddyVersion(), Commands() (#4316)
* cmd: Export CaddyVersion() * cmd: Add getter Commands()
Diffstat (limited to 'cmd/commands.go')
-rw-r--r--cmd/commands.go6
1 files changed, 6 insertions, 0 deletions
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() {