summaryrefslogtreecommitdiff
path: root/cmd/commands.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/commands.go')
-rw-r--r--cmd/commands.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/commands.go b/cmd/commands.go
index 37ede3a..f98fbfa 100644
--- a/cmd/commands.go
+++ b/cmd/commands.go
@@ -274,6 +274,8 @@ directly instead of printing it.`,
// This function panics if the name is already registered,
// if the name does not meet the described format, or if
// any of the fields are missing from cmd.
+//
+// This function should be used in init().
func RegisterCommand(cmd Command) {
if cmd.Name == "" {
panic("command name is required")