diff --git a/go.mod b/go.mod index ce39869..9cb450e 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/coreos/go-semver v0.3.0 github.com/go-redis/redis/v8 v8.11.5 github.com/prometheus/client_golang v1.11.0 - github.com/sandwich-go/rueidis v0.1.11 + github.com/sandwich-go/rueidis v0.1.12 github.com/smartystreets/goconvey v1.7.2 ) diff --git a/go.sum b/go.sum index c8dcea8..95b12d3 100644 --- a/go.sum +++ b/go.sum @@ -97,8 +97,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/sandwich-go/rueidis v0.1.11 h1:+lmTofyyzBb0dXLyuegE5NoAaXZxrVg+9QL5gEFnKYk= -github.com/sandwich-go/rueidis v0.1.11/go.mod h1:N894IGktaGEm5gMWxD7u6XSxkpSzxCStQEOKjqOJQ/k= +github.com/sandwich-go/rueidis v0.1.12 h1:8ZksyYJPESep8YlBnz5woRxF+Tj84wVdsCttp9eFVnc= +github.com/sandwich-go/rueidis v0.1.12/go.mod h1:IsXMwxHDgHbixhfVR36KBE/8TdCcR07Igenwb5AnHIA= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= diff --git a/redis_resp3.go b/redis_resp3.go index 4e09434..f07dc3f 100644 --- a/redis_resp3.go +++ b/redis_resp3.go @@ -325,10 +325,7 @@ func (r *resp3) Migrate(ctx context.Context, host, port, key string, db int, tim return newStatusCmdWithError(err) } var migratePort = r.cmd.B().Migrate().Host(host).Port(iport) - if len(key) > 0 { - return newStatusCmd(r.cmd.Do(ctx, migratePort.Key().DestinationDb(int64(db)).Timeout(formatSec(timeout)).Build())) - } - return newStatusCmd(r.cmd.Do(ctx, migratePort.Empty().DestinationDb(int64(db)).Timeout(formatSec(timeout)).Build())) + return newStatusCmd(r.cmd.Do(ctx, migratePort.Key(key).DestinationDb(int64(db)).Timeout(formatSec(timeout)).Build())) } func (r *resp3) Move(ctx context.Context, key string, db int) BoolCmd {