@@ -13,7 +13,7 @@ import (
13
13
// otherwise you will receive an error: (error) ERR syntax error.
14
14
// For example:
15
15
//
16
- // rdb.Set(ctx, key, value, redis.KeepTTL)
16
+ // rdb.Set(ctx, key, value, redis.KeepTTL)
17
17
const KeepTTL = - 1
18
18
19
19
func usePrecise (dur time.Duration ) bool {
@@ -2052,8 +2052,10 @@ func xClaimArgs(a *XClaimArgs) []interface{} {
2052
2052
2053
2053
// xTrim If approx is true, add the "~" parameter, otherwise it is the default "=" (redis default).
2054
2054
// example:
2055
- // XTRIM key MAXLEN/MINID threshold LIMIT limit.
2056
- // XTRIM key MAXLEN/MINID ~ threshold LIMIT limit.
2055
+ //
2056
+ // XTRIM key MAXLEN/MINID threshold LIMIT limit.
2057
+ // XTRIM key MAXLEN/MINID ~ threshold LIMIT limit.
2058
+ //
2057
2059
// The redis-server version is lower than 6.2, please set limit to 0.
2058
2060
func (c cmdable ) xTrim (
2059
2061
ctx context.Context , key , strategy string ,
@@ -2391,11 +2393,13 @@ func (c cmdable) ZPopMin(ctx context.Context, key string, count ...int64) *ZSlic
2391
2393
2392
2394
// ZRangeArgs is all the options of the ZRange command.
2393
2395
// In version> 6.2.0, you can replace the(cmd):
2394
- // ZREVRANGE,
2395
- // ZRANGEBYSCORE,
2396
- // ZREVRANGEBYSCORE,
2397
- // ZRANGEBYLEX,
2398
- // ZREVRANGEBYLEX.
2396
+ //
2397
+ // ZREVRANGE,
2398
+ // ZRANGEBYSCORE,
2399
+ // ZREVRANGEBYSCORE,
2400
+ // ZRANGEBYLEX,
2401
+ // ZREVRANGEBYLEX.
2402
+ //
2399
2403
// Please pay attention to your redis-server version.
2400
2404
//
2401
2405
// Rev, ByScore, ByLex and Offset+Count options require redis-server 6.2.0 and higher.
@@ -2799,7 +2803,7 @@ func (c cmdable) ClientKill(ctx context.Context, ipPort string) *StatusCmd {
2799
2803
2800
2804
// ClientKillByFilter is new style syntax, while the ClientKill is old
2801
2805
//
2802
- // CLIENT KILL <option> [value] ... <option> [value]
2806
+ // CLIENT KILL <option> [value] ... <option> [value]
2803
2807
func (c cmdable ) ClientKillByFilter (ctx context.Context , keys ... string ) * IntCmd {
2804
2808
args := make ([]interface {}, 2 + len (keys ))
2805
2809
args [0 ] = "client"
@@ -2902,10 +2906,11 @@ func (c cmdable) FlushDBAsync(ctx context.Context) *StatusCmd {
2902
2906
return cmd
2903
2907
}
2904
2908
2905
- func (c cmdable ) Info (ctx context.Context , section ... string ) * StringCmd {
2906
- args := []interface {}{"info" }
2907
- if len (section ) > 0 {
2908
- args = append (args , section [0 ])
2909
+ func (c cmdable ) Info (ctx context.Context , sections ... string ) * StringCmd {
2910
+ args := make ([]interface {}, 1 + len (sections ))
2911
+ args [0 ] = "info"
2912
+ for i , section := range sections {
2913
+ args [i + 1 ] = section
2909
2914
}
2910
2915
cmd := NewStringCmd (ctx , args ... )
2911
2916
_ = c (ctx , cmd )
0 commit comments