@@ -57,7 +57,8 @@ func ExampleClient_timeseries_create() {
57
57
res4 , err := rdb .TSAddWithArgs (
58
58
ctx ,
59
59
"thermometer:2" ,
60
- 1 , 10.8 ,
60
+ 1 ,
61
+ 10.8 ,
61
62
& redis.TSOptions {
62
63
Retention : 100 ,
63
64
},
@@ -80,7 +81,8 @@ func ExampleClient_timeseries_create() {
80
81
res6 , err := rdb .TSAddWithArgs (
81
82
ctx ,
82
83
"thermometer:3" ,
83
- 1 , 10.4 ,
84
+ 1 ,
85
+ 10.4 ,
84
86
& redis.TSOptions {
85
87
Labels : map [string ]string {
86
88
"location" : "UK" ,
@@ -200,9 +202,7 @@ func ExampleClient_timeseries_range() {
200
202
// Retrieve all the data points in ascending order.
201
203
// Note: use 0 and `math.MaxInt64` instead of - and +
202
204
// to denote the minimum and maximum possible timestamps.
203
- res3 , err := rdb .TSRange (ctx , "rg:1" ,
204
- 0 , math .MaxInt64 ,
205
- ).Result ()
205
+ res3 , err := rdb .TSRange (ctx , "rg:1" , 0 , math .MaxInt64 ).Result ()
206
206
if err != nil {
207
207
panic (err )
208
208
}
@@ -252,7 +252,8 @@ func ExampleClient_timeseries_range() {
252
252
res8 , err := rdb .TSRangeWithArgs (
253
253
ctx ,
254
254
"rg:1" ,
255
- 0 , math .MaxInt64 ,
255
+ 0 ,
256
+ math .MaxInt64 ,
256
257
& redis.TSRangeOptions {
257
258
FilterByTS : []int {0 , 2 , 4 },
258
259
},
@@ -266,7 +267,8 @@ func ExampleClient_timeseries_range() {
266
267
res9 , err := rdb .TSRevRangeWithArgs (
267
268
ctx ,
268
269
"rg:1" ,
269
- 0 , math .MaxInt64 ,
270
+ 0 ,
271
+ math .MaxInt64 ,
270
272
& redis.TSRevRangeOptions {
271
273
FilterByTS : []int {0 , 2 , 4 },
272
274
FilterByValue : []int {20 , 25 },
@@ -281,7 +283,8 @@ func ExampleClient_timeseries_range() {
281
283
res10 , err := rdb .TSRevRangeWithArgs (
282
284
ctx ,
283
285
"rg:1" ,
284
- 0 , math .MaxInt64 ,
286
+ 0 ,
287
+ math .MaxInt64 ,
285
288
& redis.TSRevRangeOptions {
286
289
FilterByTS : []int {0 , 2 , 4 },
287
290
FilterByValue : []int {22 , 22 },
@@ -491,7 +494,8 @@ func ExampleClient_timeseries_query_multi() {
491
494
// specify any aggregators.
492
495
res30 , err := rdb .TSMRangeWithArgs (
493
496
ctx ,
494
- 0 , 2 ,
497
+ 0 ,
498
+ 2 ,
495
499
[]string {"unit=mm" },
496
500
& redis.TSMRangeOptions {
497
501
WithLabels : true ,
@@ -535,7 +539,8 @@ func ExampleClient_timeseries_query_multi() {
535
539
// in descending order of timestamp.
536
540
res31 , err := rdb .TSMRevRangeWithArgs (
537
541
ctx ,
538
- 1 , 3 ,
542
+ 1 ,
543
+ 3 ,
539
544
[]string {"unit=(cm,mm)" },
540
545
& redis.TSMRevRangeOptions {
541
546
SelectedLabels : []interface {}{"location" },
@@ -649,7 +654,8 @@ func ExampleClient_timeseries_aggregation() {
649
654
res32 , err := rdb .TSRangeWithArgs (
650
655
ctx ,
651
656
"rg:2" ,
652
- 0 , math .MaxInt64 ,
657
+ 0 ,
658
+ math .MaxInt64 ,
653
659
& redis.TSRangeOptions {
654
660
Aggregator : redis .Avg ,
655
661
BucketDuration : 2 ,
@@ -707,7 +713,8 @@ func ExampleClient_timeseries_agg_bucket() {
707
713
res3 , err := rdb .TSRangeWithArgs (
708
714
ctx ,
709
715
"sensor3" ,
710
- 10 , 70 ,
716
+ 10 ,
717
+ 70 ,
711
718
& redis.TSRangeOptions {
712
719
Aggregator : redis .Min ,
713
720
BucketDuration : 25 ,
@@ -724,7 +731,8 @@ func ExampleClient_timeseries_agg_bucket() {
724
731
res4 , err := rdb .TSRangeWithArgs (
725
732
ctx ,
726
733
"sensor3" ,
727
- 10 , 70 ,
734
+ 10 ,
735
+ 70 ,
728
736
& redis.TSRangeOptions {
729
737
Aggregator : redis .Min ,
730
738
BucketDuration : 25 ,
@@ -837,7 +845,8 @@ func ExampleClient_timeseries_aggmulti() {
837
845
// for the country at that timestamp.
838
846
res44 , err := rdb .TSMRangeWithArgs (
839
847
ctx ,
840
- 0 , math .MaxInt64 ,
848
+ 0 ,
849
+ math .MaxInt64 ,
841
850
[]string {"country=(us,uk)" },
842
851
& redis.TSMRangeOptions {
843
852
GroupByLabel : "country" ,
@@ -884,7 +893,8 @@ func ExampleClient_timeseries_aggmulti() {
884
893
// for the country at that timestamp.
885
894
res45 , err := rdb .TSMRangeWithArgs (
886
895
ctx ,
887
- 0 , math .MaxInt64 ,
896
+ 0 ,
897
+ math .MaxInt64 ,
888
898
[]string {"country=(us,uk)" },
889
899
& redis.TSMRangeOptions {
890
900
GroupByLabel : "country" ,
0 commit comments