Do queues the custom command for later execution.
(ctx context.Context, args ...interface{})
| 71 | |
| 72 | // Do queues the custom command for later execution. |
| 73 | func (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. |
| 84 | func (c *Pipeline) Process(ctx context.Context, cmd Cmder) error { |