(key string, index int64)
| 221 | } |
| 222 | |
| 223 | func (c Client) LINDEX(key string, index int64) (element ReturnValue, err error) { |
| 224 | node, _, err := c.listNodeAtIndex(key, index) |
| 225 | if err != nil { |
| 226 | return |
| 227 | } |
| 228 | |
| 229 | return node.value, err |
| 230 | } |
| 231 | |
| 232 | func (c Client) listNodeAtIndex(key string, index int64) (node listNode, found bool, err error) { |
| 233 | side := Left |