command: hard wrap help message flags
Test / Create distribution (push) Successful in 53s
Test / Sandbox (push) Successful in 2m51s
Test / Hakurei (push) Successful in 4m29s
Test / Sandbox (race detector) (push) Successful in 5m53s
Test / Hakurei (race detector) (push) Successful in 7m2s
Test / ShareFS (push) Successful in 7m19s
Test / Flake checks (push) Successful in 1m8s
Test / Create distribution (push) Successful in 53s
Test / Sandbox (push) Successful in 2m51s
Test / Hakurei (push) Successful in 4m29s
Test / Sandbox (race detector) (push) Successful in 5m53s
Test / Hakurei (race detector) (push) Successful in 7m2s
Test / ShareFS (push) Successful in 7m19s
Test / Flake checks (push) Successful in 1m8s
This greatly improves readability when lots of flags are registered. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -19,10 +19,9 @@ func TestHelp(t *testing.T) {
|
||||
want string
|
||||
}{
|
||||
{
|
||||
"main", []string{}, `
|
||||
Usage: hakurei [-h | --help] [-v] [--insecure] [--json] COMMAND [OPTIONS]
|
||||
"main", []string{}, `usage: hakurei [-h | --help] [-v] [--insecure] [--json] <command> [<args>]
|
||||
|
||||
Commands:
|
||||
commands:
|
||||
run Load and start container from configuration file
|
||||
exec Configure and start a permissive container
|
||||
show Show live or local instance configuration
|
||||
@@ -35,10 +34,14 @@ Commands:
|
||||
`,
|
||||
},
|
||||
{
|
||||
"exec", []string{"exec", "-h"}, `
|
||||
Usage: hakurei exec [-h | --help] [--dbus-config <value>] [--dbus-system <value>] [--mpris] [--dbus-log] [--id <value>] [-a <int>] [-g <value>] [-d <value>] [-u <value>] [--policy <value>] [--priority <int>] [--private-runtime] [--private-tmpdir] [--wayland] [-X] [--dbus] [--pipewire] [--pulse] COMMAND [OPTIONS]
|
||||
"exec", []string{"exec", "-h"}, `usage: hakurei exec [-h | --help] [--dbus-config <value>]
|
||||
[--dbus-system <value>] [--mpris] [--dbus-log]
|
||||
[--id <value>] [-a <int>] [-g <value>] [-d <value>]
|
||||
[-u <value>] [--policy <value>] [--priority <int>]
|
||||
[--private-runtime] [--private-tmpdir] [--wayland] [-X]
|
||||
[--dbus] [--pipewire] [--pulse] <command> [<args>]
|
||||
|
||||
Flags:
|
||||
flags:
|
||||
-X Enable direct connection to X11
|
||||
-a int
|
||||
Application identity
|
||||
|
||||
Reference in New Issue
Block a user