| 21 | } |
| 22 | |
| 23 | type Subcommand struct { |
| 24 | config *config |
| 25 | fset *flag.FlagSet |
| 26 | run func(ctx context.Context) error |
| 27 | parsed bool |
| 28 | |
| 29 | // state for the template |
| 30 | name string |
| 31 | usage string |
| 32 | commands map[string]*Subcommand |
| 33 | flags []*Flag |
| 34 | args []*Arg |
| 35 | restArgs *Args // optional, collects the rest of the args |
| 36 | } |
| 37 | |
| 38 | var _ Command = (*Subcommand)(nil) |
| 39 |
nothing calls this directly
no outgoing calls
no test coverage detected