mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Refactor Tx using Pipeline to implement Cmdable interface.
This commit is contained in:
@ -190,8 +190,8 @@ func ExampleClient_Watch() {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = tx.MultiExec(func() error {
|
||||
tx.Set(key, strconv.FormatInt(n+1, 10), 0)
|
||||
_, err = tx.Pipelined(func(pipe *redis.Pipeline) error {
|
||||
pipe.Set(key, strconv.FormatInt(n+1, 10), 0)
|
||||
return nil
|
||||
})
|
||||
return err
|
||||
|
Reference in New Issue
Block a user