mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Don't return an error when pipeline is empty
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
package redis
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"sync"
|
||||
|
||||
"github.com/go-redis/redis/internal/pool"
|
||||
@ -80,7 +79,7 @@ func (c *Pipeline) Exec() ([]Cmder, error) {
|
||||
}
|
||||
|
||||
if len(c.cmds) == 0 {
|
||||
return nil, errors.New("redis: pipeline is empty")
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
cmds := c.cmds
|
||||
|
Reference in New Issue
Block a user