Run is the entry point to the command graph. The positional arguments are parsed according to the Flag and Command definitions and the matching Action functions are run.
(ctx context.Context, osArgs []string)
| 92 | // arguments are parsed according to the Flag and Command |
| 93 | // definitions and the matching Action functions are run. |
| 94 | func (cmd *Command) Run(ctx context.Context, osArgs []string) (deferErr error) { |
| 95 | _, deferErr = cmd.run(ctx, osArgs) |
| 96 | return deferErr |
| 97 | } |
| 98 | |
| 99 | func (cmd *Command) run(ctx context.Context, osArgs []string) (_ context.Context, deferErr error) { |
| 100 | tracef("running with arguments %[1]q (cmd=%[2]q)", osArgs, cmd.Name) |