@@ -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 {
@@ -96,10 +96,6 @@ type Cmdable interface {
96
96
Exists (ctx context.Context , keys ... string ) * IntCmd
97
97
Expire (ctx context.Context , key string , expiration time.Duration ) * BoolCmd
98
98
ExpireAt (ctx context.Context , key string , tm time.Time ) * BoolCmd
99
- ExpireNX (ctx context.Context , key string , expiration time.Duration ) * BoolCmd
100
- ExpireXX (ctx context.Context , key string , expiration time.Duration ) * BoolCmd
101
- ExpireGT (ctx context.Context , key string , expiration time.Duration ) * BoolCmd
102
- ExpireLT (ctx context.Context , key string , expiration time.Duration ) * BoolCmd
103
99
Keys (ctx context.Context , pattern string ) * StringSliceCmd
104
100
Migrate (ctx context.Context , host , port , key string , db int , timeout time.Duration ) * StatusCmd
105
101
Move (ctx context.Context , key string , db int ) * BoolCmd
@@ -534,22 +530,6 @@ func (c cmdable) Expire(ctx context.Context, key string, expiration time.Duratio
534
530
return c .expire (ctx , key , expiration , "" )
535
531
}
536
532
537
- func (c cmdable ) ExpireNX (ctx context.Context , key string , expiration time.Duration ) * BoolCmd {
538
- return c .expire (ctx , key , expiration , "NX" )
539
- }
540
-
541
- func (c cmdable ) ExpireXX (ctx context.Context , key string , expiration time.Duration ) * BoolCmd {
542
- return c .expire (ctx , key , expiration , "XX" )
543
- }
544
-
545
- func (c cmdable ) ExpireGT (ctx context.Context , key string , expiration time.Duration ) * BoolCmd {
546
- return c .expire (ctx , key , expiration , "GT" )
547
- }
548
-
549
- func (c cmdable ) ExpireLT (ctx context.Context , key string , expiration time.Duration ) * BoolCmd {
550
- return c .expire (ctx , key , expiration , "LT" )
551
- }
552
-
553
533
func (c cmdable ) expire (
554
534
ctx context.Context , key string , expiration time.Duration , mode string ,
555
535
) * BoolCmd {
@@ -2049,8 +2029,10 @@ func xClaimArgs(a *XClaimArgs) []interface{} {
2049
2029
2050
2030
// xTrim If approx is true, add the "~" parameter, otherwise it is the default "=" (redis default).
2051
2031
// example:
2052
- // XTRIM key MAXLEN/MINID threshold LIMIT limit.
2053
- // XTRIM key MAXLEN/MINID ~ threshold LIMIT limit.
2032
+ //
2033
+ // XTRIM key MAXLEN/MINID threshold LIMIT limit.
2034
+ // XTRIM key MAXLEN/MINID ~ threshold LIMIT limit.
2035
+ //
2054
2036
// The redis-server version is lower than 6.2, please set limit to 0.
2055
2037
func (c cmdable ) xTrim (
2056
2038
ctx context.Context , key , strategy string ,
@@ -2298,6 +2280,7 @@ func (c cmdable) ZAddXX(ctx context.Context, key string, members ...*Z) *IntCmd
2298
2280
2299
2281
// ZAddCh Redis `ZADD key CH score member [score member ...]` command.
2300
2282
// Deprecated: Use
2283
+ //
2301
2284
// client.ZAddArgs(ctx, ZAddArgs{
2302
2285
// Ch: true,
2303
2286
// Members: []Z,
@@ -2311,6 +2294,7 @@ func (c cmdable) ZAddCh(ctx context.Context, key string, members ...*Z) *IntCmd
2311
2294
2312
2295
// ZAddNXCh Redis `ZADD key NX CH score member [score member ...]` command.
2313
2296
// Deprecated: Use
2297
+ //
2314
2298
// client.ZAddArgs(ctx, ZAddArgs{
2315
2299
// NX: true,
2316
2300
// Ch: true,
@@ -2326,6 +2310,7 @@ func (c cmdable) ZAddNXCh(ctx context.Context, key string, members ...*Z) *IntCm
2326
2310
2327
2311
// ZAddXXCh Redis `ZADD key XX CH score member [score member ...]` command.
2328
2312
// Deprecated: Use
2313
+ //
2329
2314
// client.ZAddArgs(ctx, ZAddArgs{
2330
2315
// XX: true,
2331
2316
// Ch: true,
@@ -2341,6 +2326,7 @@ func (c cmdable) ZAddXXCh(ctx context.Context, key string, members ...*Z) *IntCm
2341
2326
2342
2327
// ZIncr Redis `ZADD key INCR score member` command.
2343
2328
// Deprecated: Use
2329
+ //
2344
2330
// client.ZAddArgsIncr(ctx, ZAddArgs{
2345
2331
// Members: []Z,
2346
2332
// })
@@ -2353,6 +2339,7 @@ func (c cmdable) ZIncr(ctx context.Context, key string, member *Z) *FloatCmd {
2353
2339
2354
2340
// ZIncrNX Redis `ZADD key NX INCR score member` command.
2355
2341
// Deprecated: Use
2342
+ //
2356
2343
// client.ZAddArgsIncr(ctx, ZAddArgs{
2357
2344
// NX: true,
2358
2345
// Members: []Z,
@@ -2367,6 +2354,7 @@ func (c cmdable) ZIncrNX(ctx context.Context, key string, member *Z) *FloatCmd {
2367
2354
2368
2355
// ZIncrXX Redis `ZADD key XX INCR score member` command.
2369
2356
// Deprecated: Use
2357
+ //
2370
2358
// client.ZAddArgsIncr(ctx, ZAddArgs{
2371
2359
// XX: true,
2372
2360
// Members: []Z,
@@ -2488,11 +2476,13 @@ func (c cmdable) ZPopMin(ctx context.Context, key string, count ...int64) *ZSlic
2488
2476
2489
2477
// ZRangeArgs is all the options of the ZRange command.
2490
2478
// In version> 6.2.0, you can replace the(cmd):
2491
- // ZREVRANGE,
2492
- // ZRANGEBYSCORE,
2493
- // ZREVRANGEBYSCORE,
2494
- // ZRANGEBYLEX,
2495
- // ZREVRANGEBYLEX.
2479
+ //
2480
+ // ZREVRANGE,
2481
+ // ZRANGEBYSCORE,
2482
+ // ZREVRANGEBYSCORE,
2483
+ // ZRANGEBYLEX,
2484
+ // ZREVRANGEBYLEX.
2485
+ //
2496
2486
// Please pay attention to your redis-server version.
2497
2487
//
2498
2488
// Rev, ByScore, ByLex and Offset+Count options require redis-server 6.2.0 and higher.
@@ -2897,7 +2887,7 @@ func (c cmdable) ClientKill(ctx context.Context, ipPort string) *StatusCmd {
2897
2887
2898
2888
// ClientKillByFilter is new style syntax, while the ClientKill is old
2899
2889
//
2900
- // CLIENT KILL <option> [value] ... <option> [value]
2890
+ // CLIENT KILL <option> [value] ... <option> [value]
2901
2891
func (c cmdable ) ClientKillByFilter (ctx context.Context , keys ... string ) * IntCmd {
2902
2892
args := make ([]interface {}, 2 + len (keys ))
2903
2893
args [0 ] = "client"
0 commit comments