address review comments
This commit is contained in:
parent
cfd894f446
commit
9f5522668a
5
usage.go
5
usage.go
|
@ -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,
|
// if the program supports subcommands, give a hint to the user about their existence
|
||||||
// give a hint to the user about the existence of these subcommands.
|
if len(cmd.subcommands) > 0 {
|
||||||
if len(p.cmd.subcommands) > 0 && p.cmd == cmd {
|
|
||||||
fmt.Fprint(w, " <command> [<args>]")
|
fmt.Fprint(w, " <command> [<args>]")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue