diff options
| author | Marco Molteni <[email protected]> | 2020-01-23 16:35:45 +0100 |
|---|---|---|
| committer | Marco Molteni <[email protected]> | 2020-01-23 16:35:45 +0100 |
| commit | 9f5522668a8d573c5d5dbe6ee0584f395fba3806 (patch) | |
| tree | eb38238fdba666065b3fa665a7a6d302118477b9 /usage.go | |
| parent | cfd894f446f356ed1c0fb37d88aee8c34bb4e40c (diff) | |
address review comments
Diffstat (limited to 'usage.go')
| -rw-r--r-- | usage.go | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -89,9 +89,8 @@ func (p *Parser) writeUsageForCommand(w io.Writer, cmd *command) { } } - // if the program supports subcommands and the command-line doesn't contain any, - // give a hint to the user about the existence of these subcommands. - if len(p.cmd.subcommands) > 0 && p.cmd == cmd { + // if the program supports subcommands, give a hint to the user about their existence + if len(cmd.subcommands) > 0 { fmt.Fprint(w, " <command> [<args>]") } |
