Browse Source

增加ZScoreInt64方法

master v1.4.0
guzeng 2 years ago
parent
commit
dc1ba04572
1 changed files with 19 additions and 0 deletions
  1. +19
    -0
      zset.go

+ 19
- 0
zset.go View File

@ -207,5 +207,24 @@ func ZScore(key string, member interface{}) (float64, error) {
} else {
return redisdb.Float64(reply, nil)
}
}
/*
* 指定成员的分数, 返回int64
* key
* member 成员
*/
func ZScoreInt64(key string, member interface{}) (int64, error) {
c := GetConn()
reply, err := c.Do("ZSCORE", key, member)
CloseConn(c)
if err != nil {
return 0, err
} else {
return redisdb.Int64(reply, nil)
}
}

Loading…
Cancel
Save