diff options
| author | Andrew Morozko <[email protected]> | 2020-12-20 03:51:33 +0300 |
|---|---|---|
| committer | Andrew Morozko <[email protected]> | 2020-12-20 03:51:33 +0300 |
| commit | 438a91dba1e3f7a9263f5408899eeeb12d8453ed (patch) | |
| tree | 90a11091275809fcbe2d6f449471dfa2bab453f4 /usage.go | |
| parent | 04c3fdbd8019af78797e714ac5070d7056e71f57 (diff) | |
Skip right column if the left is empty
Diffstat (limited to 'usage.go')
| -rw-r--r-- | usage.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -117,6 +117,9 @@ func (p *Parser) writeUsageForCommand(w io.Writer, cmd *command) { } func printTwoCols(w io.Writer, left, help string, defaultVal string, envVal string) { + if left == "" { + return + } lhs := " " + left fmt.Fprint(w, lhs) if help != "" { |
