MCPcopy
hub / github.com/redis/go-redis / Do

Method Do

pipeline.go:73–81  ·  view source on GitHub ↗

Do queues the custom command for later execution.

(ctx context.Context, args ...interface{})

Source from the content-addressed store, hash-verified

71
72// Do queues the custom command for later execution.
73func (c *Pipeline) Do(ctx context.Context, args ...interface{}) *Cmd {
74 cmd := NewCmd(ctx, args...)
75 if len(args) == 0 {
76 cmd.SetErr(errors.New("redis: please enter the command to be executed"))
77 return cmd
78 }
79 _ = c.Process(ctx, cmd)
80 return cmd
81}
82
83// Process queues the cmd for later execution.
84func (c *Pipeline) Process(ctx context.Context, cmd Cmder) error {

Callers

nothing calls this directly

Calls 3

ProcessMethod · 0.95
NewCmdFunction · 0.85
SetErrMethod · 0.65

Tested by

no test coverage detected