forked from mirror/redis
Add missing "BY" argument to Sort args list.
Fixes "ERR syntax error" issue with Sort{By: "pattern"}.
This commit is contained in:
parent
c9c1f18a58
commit
daade895aa
|
@ -196,7 +196,7 @@ type Sort struct {
|
|||
func (c *Client) Sort(key string, sort Sort) *StringSliceCmd {
|
||||
args := []string{"SORT", key}
|
||||
if sort.By != "" {
|
||||
args = append(args, sort.By)
|
||||
args = append(args, "BY", sort.By)
|
||||
}
|
||||
if sort.Offset != 0 || sort.Count != 0 {
|
||||
args = append(args, "LIMIT", formatFloat(sort.Offset), formatFloat(sort.Count))
|
||||
|
|
Loading…
Reference in New Issue