From 647c6ea21baa28192e5c4339ed4cdf83e994036e Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 23 Feb 2025 01:36:48 +0900 Subject: command: hide internal commands This marks commands as internal via a magic usage string. Signed-off-by: Ophestra --- command/command.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'command/command.go') diff --git a/command/command.go b/command/command.go index 525dde3d..eeec135d 100644 --- a/command/command.go +++ b/command/command.go @@ -6,6 +6,9 @@ import ( "strings" ) +// UsageInternal causes the command to be hidden from help text when set as the usage string. +const UsageInternal = "internal" + type ( // HandlerFunc is called when matching a directly handled subcommand tree. HandlerFunc = func(args []string) error -- cgit v1.3.1