@@ -13,7 +13,7 @@ import (
1313// otherwise you will receive an error: (error) ERR syntax error.
1414// For example:
1515//
16- // rdb.Set(ctx, key, value, redis.KeepTTL)
16+ // rdb.Set(ctx, key, value, redis.KeepTTL)
1717const KeepTTL = - 1
1818
1919func usePrecise (dur time.Duration ) bool {
@@ -2052,8 +2052,10 @@ func xClaimArgs(a *XClaimArgs) []interface{} {
20522052
20532053// xTrim If approx is true, add the "~" parameter, otherwise it is the default "=" (redis default).
20542054// 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+ //
20572059// The redis-server version is lower than 6.2, please set limit to 0.
20582060func (c cmdable ) xTrim (
20592061 ctx context.Context , key , strategy string ,
@@ -2391,11 +2393,13 @@ func (c cmdable) ZPopMin(ctx context.Context, key string, count ...int64) *ZSlic
23912393
23922394// ZRangeArgs is all the options of the ZRange command.
23932395// 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+ //
23992403// Please pay attention to your redis-server version.
24002404//
24012405// 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 {
27992803
28002804// ClientKillByFilter is new style syntax, while the ClientKill is old
28012805//
2802- // CLIENT KILL <option> [value] ... <option> [value]
2806+ // CLIENT KILL <option> [value] ... <option> [value]
28032807func (c cmdable ) ClientKillByFilter (ctx context.Context , keys ... string ) * IntCmd {
28042808 args := make ([]interface {}, 2 + len (keys ))
28052809 args [0 ] = "client"
@@ -2902,10 +2906,11 @@ func (c cmdable) FlushDBAsync(ctx context.Context) *StatusCmd {
29022906 return cmd
29032907}
29042908
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
29092914 }
29102915 cmd := NewStringCmd (ctx , args ... )
29112916 _ = c (ctx , cmd )
0 commit comments