cmd: export CaddyVersion(), Commands() (#4316)

* cmd: Export CaddyVersion()

* cmd: Add getter Commands()
This commit is contained in:
peymaneh
2021-09-02 02:08:02 +02:00
committed by GitHub
parent 105dac8c2a
commit 9f6393c64c
3 changed files with 10 additions and 4 deletions

View File

@ -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() {