diff options
| author | Alex Flint <[email protected]> | 2019-04-30 13:49:55 -0700 |
|---|---|---|
| committer | Alex Flint <[email protected]> | 2019-04-30 13:49:55 -0700 |
| commit | 39decf197fbf257081eee533974412140d7364e2 (patch) | |
| tree | 0b4abc606261a716f7eaf8cd44aa9378a0dddb32 /parse.go | |
| parent | a78c6ded26bda9fdce7f4f3bef07ae2e9acad1cf (diff) | |
add several subcommand unittests
Diffstat (limited to 'parse.go')
| -rw-r--r-- | parse.go | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -292,7 +292,6 @@ func cmdFromStruct(name string, dest path, t reflect.Type) (*command, error) { cmd.subcommands = append(cmd.subcommands, subcmd) isSubcommand = true - fmt.Println("found a subcommand") default: errs = append(errs, fmt.Sprintf("unrecognized tag '%s' on field %s", key, tag)) return false @@ -335,8 +334,6 @@ func cmdFromStruct(name string, dest path, t reflect.Type) (*command, error) { return nil, fmt.Errorf("%T cannot have both subcommands and positional arguments", t) } - fmt.Printf("parsed a command with %d subcommands\n", len(cmd.subcommands)) - return &cmd, nil } @@ -434,7 +431,6 @@ func (p *Parser) process(args []string) error { if !isFlag(arg) || allpositional { // each subcommand can have either subcommands or positionals, but not both - fmt.Printf("processing %q, with %d subcommands", arg, len(curCmd.subcommands)) if len(curCmd.subcommands) == 0 { positionals = append(positionals, arg) continue |
