@@ -1161,7 +1161,7 @@ var _ = Describe("Commands", func() {
1161
1161
})
1162
1162
1163
1163
It ("should SetWithArgs with TTL" , func () {
1164
- args := & redis.SetArgs {
1164
+ args := redis.SetArgs {
1165
1165
TTL : 500 * time .Millisecond ,
1166
1166
}
1167
1167
err := client .SetArgs (ctx , "key" , "hello" , args ).Err ()
@@ -1178,7 +1178,7 @@ var _ = Describe("Commands", func() {
1178
1178
1179
1179
It ("should SetWithArgs with expiration date" , func () {
1180
1180
expireAt := time .Now ().AddDate (1 , 1 , 1 )
1181
- args := & redis.SetArgs {
1181
+ args := redis.SetArgs {
1182
1182
ExpireAt : expireAt ,
1183
1183
}
1184
1184
err := client .SetArgs (ctx , "key" , "hello" , args ).Err ()
@@ -1196,7 +1196,7 @@ var _ = Describe("Commands", func() {
1196
1196
})
1197
1197
1198
1198
It ("should SetWithArgs with negative expiration date" , func () {
1199
- args := & redis.SetArgs {
1199
+ args := redis.SetArgs {
1200
1200
ExpireAt : time .Now ().AddDate (- 3 , 1 , 1 ),
1201
1201
}
1202
1202
// redis accepts a timestamp less than the current date
@@ -1211,15 +1211,15 @@ var _ = Describe("Commands", func() {
1211
1211
1212
1212
It ("should SetWithArgs with keepttl" , func () {
1213
1213
// Set with ttl
1214
- argsWithTTL := & redis.SetArgs {
1214
+ argsWithTTL := redis.SetArgs {
1215
1215
TTL : 5 * time .Second ,
1216
1216
}
1217
1217
set := client .SetArgs (ctx , "key" , "hello" , argsWithTTL )
1218
1218
Expect (set .Err ()).NotTo (HaveOccurred ())
1219
1219
Expect (set .Result ()).To (Equal ("OK" ))
1220
1220
1221
1221
// Set with keepttl
1222
- argsWithKeepTTL := & redis.SetArgs {
1222
+ argsWithKeepTTL := redis.SetArgs {
1223
1223
KeepTTL : true ,
1224
1224
}
1225
1225
set = client .SetArgs (ctx , "key" , "hello" , argsWithKeepTTL )
@@ -1236,7 +1236,7 @@ var _ = Describe("Commands", func() {
1236
1236
err := client .Set (ctx , "key" , "hello" , 0 ).Err ()
1237
1237
Expect (err ).NotTo (HaveOccurred ())
1238
1238
1239
- args := & redis.SetArgs {
1239
+ args := redis.SetArgs {
1240
1240
Mode : "nx" ,
1241
1241
}
1242
1242
val , err := client .SetArgs (ctx , "key" , "hello" , args ).Result ()
@@ -1245,7 +1245,7 @@ var _ = Describe("Commands", func() {
1245
1245
})
1246
1246
1247
1247
It ("should SetWithArgs with NX mode and key does not exist" , func () {
1248
- args := & redis.SetArgs {
1248
+ args := redis.SetArgs {
1249
1249
Mode : "nx" ,
1250
1250
}
1251
1251
val , err := client .SetArgs (ctx , "key" , "hello" , args ).Result ()
@@ -1254,7 +1254,7 @@ var _ = Describe("Commands", func() {
1254
1254
})
1255
1255
1256
1256
It ("should SetWithArgs with NX mode and GET option" , func () {
1257
- args := & redis.SetArgs {
1257
+ args := redis.SetArgs {
1258
1258
Mode : "nx" ,
1259
1259
Get : true ,
1260
1260
}
@@ -1264,7 +1264,7 @@ var _ = Describe("Commands", func() {
1264
1264
})
1265
1265
1266
1266
It ("should SetWithArgs with expiration, NX mode, and key does not exist" , func () {
1267
- args := & redis.SetArgs {
1267
+ args := redis.SetArgs {
1268
1268
TTL : 500 * time .Millisecond ,
1269
1269
Mode : "nx" ,
1270
1270
}
@@ -1281,7 +1281,7 @@ var _ = Describe("Commands", func() {
1281
1281
e := client .Set (ctx , "key" , "hello" , 0 )
1282
1282
Expect (e .Err ()).NotTo (HaveOccurred ())
1283
1283
1284
- args := & redis.SetArgs {
1284
+ args := redis.SetArgs {
1285
1285
TTL : 500 * time .Millisecond ,
1286
1286
Mode : "nx" ,
1287
1287
}
@@ -1291,7 +1291,7 @@ var _ = Describe("Commands", func() {
1291
1291
})
1292
1292
1293
1293
It ("should SetWithArgs with expiration, NX mode, and GET option" , func () {
1294
- args := & redis.SetArgs {
1294
+ args := redis.SetArgs {
1295
1295
TTL : 500 * time .Millisecond ,
1296
1296
Mode : "nx" ,
1297
1297
Get : true ,
@@ -1302,7 +1302,7 @@ var _ = Describe("Commands", func() {
1302
1302
})
1303
1303
1304
1304
It ("should SetWithArgs with XX mode and key does not exist" , func () {
1305
- args := & redis.SetArgs {
1305
+ args := redis.SetArgs {
1306
1306
Mode : "xx" ,
1307
1307
}
1308
1308
val , err := client .SetArgs (ctx , "key" , "world" , args ).Result ()
@@ -1314,7 +1314,7 @@ var _ = Describe("Commands", func() {
1314
1314
e := client .Set (ctx , "key" , "hello" , 0 ).Err ()
1315
1315
Expect (e ).NotTo (HaveOccurred ())
1316
1316
1317
- args := & redis.SetArgs {
1317
+ args := redis.SetArgs {
1318
1318
Mode : "xx" ,
1319
1319
}
1320
1320
val , err := client .SetArgs (ctx , "key" , "world" , args ).Result ()
@@ -1326,7 +1326,7 @@ var _ = Describe("Commands", func() {
1326
1326
e := client .Set (ctx , "key" , "hello" , 0 ).Err ()
1327
1327
Expect (e ).NotTo (HaveOccurred ())
1328
1328
1329
- args := & redis.SetArgs {
1329
+ args := redis.SetArgs {
1330
1330
Mode : "xx" ,
1331
1331
Get : true ,
1332
1332
}
@@ -1336,7 +1336,7 @@ var _ = Describe("Commands", func() {
1336
1336
})
1337
1337
1338
1338
It ("should SetWithArgs with XX mode and GET option, and key does not exist" , func () {
1339
- args := & redis.SetArgs {
1339
+ args := redis.SetArgs {
1340
1340
Mode : "xx" ,
1341
1341
Get : true ,
1342
1342
}
@@ -1347,7 +1347,7 @@ var _ = Describe("Commands", func() {
1347
1347
})
1348
1348
1349
1349
It ("should SetWithArgs with expiration, XX mode, GET option, and key does not exist" , func () {
1350
- args := & redis.SetArgs {
1350
+ args := redis.SetArgs {
1351
1351
TTL : 500 * time .Millisecond ,
1352
1352
Mode : "xx" ,
1353
1353
Get : true ,
@@ -1362,7 +1362,7 @@ var _ = Describe("Commands", func() {
1362
1362
e := client .Set (ctx , "key" , "hello" , 0 )
1363
1363
Expect (e .Err ()).NotTo (HaveOccurred ())
1364
1364
1365
- args := & redis.SetArgs {
1365
+ args := redis.SetArgs {
1366
1366
TTL : 500 * time .Millisecond ,
1367
1367
Mode : "xx" ,
1368
1368
Get : true ,
@@ -1378,7 +1378,7 @@ var _ = Describe("Commands", func() {
1378
1378
})
1379
1379
1380
1380
It ("should SetWithArgs with Get and key does not exist yet" , func () {
1381
- args := & redis.SetArgs {
1381
+ args := redis.SetArgs {
1382
1382
Get : true ,
1383
1383
}
1384
1384
@@ -1391,7 +1391,7 @@ var _ = Describe("Commands", func() {
1391
1391
e := client .Set (ctx , "key" , "hello" , 0 )
1392
1392
Expect (e .Err ()).NotTo (HaveOccurred ())
1393
1393
1394
- args := & redis.SetArgs {
1394
+ args := redis.SetArgs {
1395
1395
Get : true ,
1396
1396
}
1397
1397
0 commit comments