MCPcopy
hub / github.com/urfave/cli / Run

Method Run

command_run.go:94–97  ·  command_run.go::Command.Run

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)

Source from the content-addressed store, hash-verified

92// arguments are parsed according to the Flag and Command
93// definitions and the matching Action functions are run.
94func (cmd *Command) Run(ctx context.Context, osArgs []string) (deferErr error) {
95 _, deferErr = cmd.run(ctx, osArgs)
96 return deferErr
97}
98
99func (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)

Callers 15

TestIntFlagFunction · 0.95
TestInt8FlagFunction · 0.95
TestInt16FlagFunction · 0.95
TestInt32FlagFunction · 0.95
TestInt64FlagFunction · 0.95
TestIntFlagExtFunction · 0.95
TestCommand_FloatSliceFunction · 0.95
TestCommand_Float32SliceFunction · 0.95
TestCommand_Float64SliceFunction · 0.95
TestCommand_UintSliceFunction · 0.95
TestCommand_Uint8SliceFunction · 0.95
TestCommand_Uint16SliceFunction · 0.95

Calls 1

runMethod · 0.95

Tested by 15

TestIntFlagFunction · 0.76
TestInt8FlagFunction · 0.76
TestInt16FlagFunction · 0.76
TestInt32FlagFunction · 0.76
TestInt64FlagFunction · 0.76
TestIntFlagExtFunction · 0.76
TestCommand_FloatSliceFunction · 0.76
TestCommand_Float32SliceFunction · 0.76
TestCommand_Float64SliceFunction · 0.76
TestCommand_UintSliceFunction · 0.76
TestCommand_Uint8SliceFunction · 0.76
TestCommand_Uint16SliceFunction · 0.76