mirror of https://github.com/go-redis/redis.git
commands: Remove Z.ScoreString method.
This commit is contained in:
parent
ce63ade88d
commit
e993de1033
|
@ -712,14 +712,10 @@ type ZStore struct {
|
||||||
Aggregate string
|
Aggregate string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Z) ScoreString() string {
|
|
||||||
return formatFloat(m.Score)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Client) ZAdd(key string, members ...Z) *IntReq {
|
func (c *Client) ZAdd(key string, members ...Z) *IntReq {
|
||||||
args := []string{"ZADD", key}
|
args := []string{"ZADD", key}
|
||||||
for _, m := range members {
|
for _, m := range members {
|
||||||
args = append(args, m.ScoreString(), m.Member)
|
args = append(args, formatFloat(m.Score), m.Member)
|
||||||
}
|
}
|
||||||
req := NewIntReq(args...)
|
req := NewIntReq(args...)
|
||||||
c.Process(req)
|
c.Process(req)
|
||||||
|
|
Loading…
Reference in New Issue