(buf io.StringWriter, cmd *Command)
| 445 | } |
| 446 | |
| 447 | func writeCommands(buf io.StringWriter, cmd *Command) { |
| 448 | WriteStringAndCheck(buf, " commands=()\n") |
| 449 | for _, c := range cmd.Commands() { |
| 450 | if !c.IsAvailableCommand() && c != cmd.helpCommand { |
| 451 | continue |
| 452 | } |
| 453 | WriteStringAndCheck(buf, fmt.Sprintf(" commands+=(%q)\n", c.Name())) |
| 454 | writeCmdAliases(buf, c) |
| 455 | } |
| 456 | WriteStringAndCheck(buf, "\n") |
| 457 | } |
| 458 | |
| 459 | func writeFlagHandler(buf io.StringWriter, name string, annotations map[string][]string, cmd *Command) { |
| 460 | for key, value := range annotations { |
no test coverage detected