(key string, side LSide)
| 347 | } |
| 348 | |
| 349 | func (c Client) listPop(key string, side LSide) (element ReturnValue, ok bool, err error) { |
| 350 | element, transactItems, ok, err := c.listPopActions(key, side) |
| 351 | if err != nil || !ok { |
| 352 | return |
| 353 | } |
| 354 | |
| 355 | _, err = c.ddbClient.TransactWriteItemsRequest(&dynamodb.TransactWriteItemsInput{ |
| 356 | TransactItems: transactItems, |
| 357 | }).Send(context.TODO()) |
| 358 | |
| 359 | if err != nil { |
| 360 | return element, ok, err |
| 361 | } |
| 362 | |
| 363 | return element, true, nil |
| 364 | } |
| 365 | |
| 366 | func (c Client) listPopActions(key string, side LSide) (element ReturnValue, actions []dynamodb.TransactWriteItem, ok bool, err error) { |
| 367 | endNode, ok, err := c.listFindEnd(key, side) |
no test coverage detected