feat(diary): boot list, help and completion requests quietly (quick-261028-rqc)

- helpOnly also counts no command word, list, help, cobra's shell
  completion requests and --help=<bool>, read the way pflag does
- TestHelpOnlyAgreesWithCobra pins the classification against bonfire's
  real dispatch, with the passthrough --help case as the exception
- console and logging docs describe which invocations boot quietly
This commit is contained in:
Jakub Zych
2026-10-28 21:47:42 +01:00
parent 6b9becd994
commit 6c606c666b
7 changed files with 231 additions and 24 deletions

View File

@@ -82,6 +82,12 @@ func TestBootQuietSmoke(t *testing.T) {
{name: "serve --help", args: []string{"serve", "--help"}},
{name: "serve", args: []string{"serve"}, wantInfo: true},
{name: "literal options", args: []string{"serve", "--help"}, literal: true, wantInfo: true},
{name: "no args", args: []string{}},
{name: "list", args: []string{"list"}},
{name: "help serve", args: []string{"help", "serve"}},
{name: "-h", args: []string{"-h"}},
{name: "-v serve --help", args: []string{"-v", "serve", "--help"}, wantInfo: true},
{name: "queue:work", args: []string{"queue:work"}, wantInfo: true},
}
for _, row := range rows {
t.Run(row.name, func(t *testing.T) {