(ctx context.Context, zcmd, key string, opt *ZRangeBy, withScores bool)
| 479 | } |
| 480 | |
| 481 | func (c cmdable) zRangeBy(ctx context.Context, zcmd, key string, opt *ZRangeBy, withScores bool) *StringSliceCmd { |
| 482 | args := []interface{}{zcmd, key, opt.Min, opt.Max} |
| 483 | if withScores { |
| 484 | args = append(args, "withscores") |
| 485 | } |
| 486 | if opt.Offset != 0 || opt.Count != 0 { |
| 487 | args = append( |
| 488 | args, |
| 489 | "limit", |
| 490 | opt.Offset, |
| 491 | opt.Count, |
| 492 | ) |
| 493 | } |
| 494 | cmd := NewStringSliceCmd(ctx, args...) |
| 495 | _ = c(ctx, cmd) |
| 496 | return cmd |
| 497 | } |
| 498 | |
| 499 | // ZRangeByScore returns members in a sorted set within a range of scores. |
| 500 | // |
no test coverage detected