Skip to content

Commit

Permalink
Update lists.md
Browse files Browse the repository at this point in the history
The example showing that RPUSH and LPUSH are variadic commands is incorrectly returning data from the wrong list name. The list name should be bikes:repairs, but the current example uses LRANGE on mylist.

Signed-off-by: David Castro <[email protected]>
  • Loading branch information
yoshuacas authored Feb 14, 2025
1 parent 2af1a9b commit a654c05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion topics/lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ multiple elements into a list in a single call:
127.0.0.1:6379> RPUSH bikes:repairs bike:1 bike:2 bike:3
(integer) 3
127.0.0.1:6379> LPUSH bikes:repairs bike:important_bike bike:very_important_bike
127.0.0.1:6379> LRANGE mylist 0 -1
127.0.0.1:6379> LRANGE bikes:repairs 0 -1
1) "bike:very_important_bike"
2) "bike:important_bike"
3) "bike:1"
Expand Down

0 comments on commit a654c05

Please sign in to comment.