diff options
| author | Alex Flint <[email protected]> | 2021-05-09 14:01:08 -0700 |
|---|---|---|
| committer | Alex Flint <[email protected]> | 2021-05-09 14:01:08 -0700 |
| commit | 7cc8da61cf3da353167fcc83ad4e751f3c82ec97 (patch) | |
| tree | 41193f935d3242ff8d6d1480d1d78cc920c492ae /usage.go | |
| parent | c9b504edc1b8da6b21564c1ebf5c1b49ed9ff431 (diff) | |
simplify the error string logic
Diffstat (limited to 'usage.go')
| -rw-r--r-- | usage.go | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -310,9 +310,6 @@ func (p *Parser) lookupCommand(path ...string) (*command, error) { } } if found == nil { - if cmd.name == "" { - return nil, fmt.Errorf("%q is not a top-level subcommand", name) - } return nil, fmt.Errorf("%q is not a subcommand of %s", name, cmd.name) } cmd = found |
