mirror of
https://github.com/redis/go-redis.git
synced 2025-04-17 20:17:02 +03:00
DOC-4799 fixed capped list example (#3260)
Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
This commit is contained in:
parent
3cef280602
commit
86bb1433ca
@ -388,7 +388,7 @@ func ExampleClient_ltrim() {
|
||||
// REMOVE_END
|
||||
|
||||
// STEP_START ltrim
|
||||
res27, err := rdb.LPush(ctx, "bikes:repairs", "bike:1", "bike:2", "bike:3", "bike:4", "bike:5").Result()
|
||||
res27, err := rdb.RPush(ctx, "bikes:repairs", "bike:1", "bike:2", "bike:3", "bike:4", "bike:5").Result()
|
||||
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@ -410,13 +410,13 @@ func ExampleClient_ltrim() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
fmt.Println(res29) // >>> [bike:5 bike:4 bike:3]
|
||||
fmt.Println(res29) // >>> [bike:1 bike:2 bike:3]
|
||||
// STEP_END
|
||||
|
||||
// Output:
|
||||
// 5
|
||||
// OK
|
||||
// [bike:5 bike:4 bike:3]
|
||||
// [bike:1 bike:2 bike:3]
|
||||
}
|
||||
|
||||
func ExampleClient_ltrim_end_of_list() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user