From 39decf197fbf257081eee533974412140d7364e2 Mon Sep 17 00:00:00 2001 From: Alex Flint Date: Tue, 30 Apr 2019 13:49:55 -0700 Subject: add several subcommand unittests --- parse.go | 4 ---- 1 file changed, 4 deletions(-) (limited to 'parse.go') diff --git a/parse.go b/parse.go index 63059fc..2a3442a 100644 --- a/parse.go +++ b/parse.go @@ -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 -- cgit v1.2.3