Merge pull request #1241 from YangKian/master

Fix sample code for Sort method in README
This commit is contained in:
Vladimir Mihailenco 2020-01-19 12:17:32 +02:00 committed by GitHub
commit c1595381b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ Some corner cases:
set, err := client.SetNX("key", "value", 10*time.Second).Result() set, err := client.SetNX("key", "value", 10*time.Second).Result()
// SORT list LIMIT 0 2 ASC // SORT list LIMIT 0 2 ASC
vals, err := client.Sort("list", redis.Sort{Offset: 0, Count: 2, Order: "ASC"}).Result() vals, err := client.Sort("list", &redis.Sort{Offset: 0, Count: 2, Order: "ASC"}).Result()
// ZRANGEBYSCORE zset -inf +inf WITHSCORES LIMIT 0 2 // ZRANGEBYSCORE zset -inf +inf WITHSCORES LIMIT 0 2
vals, err := client.ZRangeByScoreWithScores("zset", redis.ZRangeBy{ vals, err := client.ZRangeByScoreWithScores("zset", redis.ZRangeBy{