Special display handler for RESP3 'invalidate' messages. * This function does not validate the reply, so it should * already be confirmed correct */
| 771 | * This function does not validate the reply, so it should |
| 772 | * already be confirmed correct */ |
| 773 | static sds cliFormatInvalidateTTY(redisReply *r) { |
| 774 | sds out = sdsnew("-> invalidate: "); |
| 775 | |
| 776 | for (size_t i = 0; i < r->element[1]->elements; i++) { |
| 777 | redisReply *key = r->element[1]->element[i]; |
| 778 | assert(key->type == REDIS_REPLY_STRING); |
| 779 | |
| 780 | out = sdscatfmt(out, "'%s'", key->str, key->len); |
| 781 | if (i < r->element[1]->elements - 1) |
| 782 | out = sdscatlen(out, ", ", 2); |
| 783 | } |
| 784 | |
| 785 | return sdscatlen(out, "\n", 1); |
| 786 | } |
| 787 | |
| 788 | static sds cliFormatReplyTTY(redisReply *r, char *prefix) { |
| 789 | sds out = sdsempty(); |
no test coverage detected