| 371 | } |
| 372 | |
| 373 | struct command_result *param_escape_format(struct command *cmd, |
| 374 | const char *name, |
| 375 | const char *buffer, |
| 376 | const jsmntok_t *tok, |
| 377 | enum escape_format **escape) |
| 378 | { |
| 379 | *escape = tal(cmd, enum escape_format); |
| 380 | if (json_tok_streq(buffer, tok, "csv")) { |
| 381 | **escape = REPORT_FMT_CSV; |
| 382 | } else if (json_tok_streq(buffer, tok, "none")) { |
| 383 | **escape = REPORT_FMT_NONE; |
| 384 | } else |
| 385 | return command_fail_badparam(cmd, name, buffer, tok, |
| 386 | "should be `csv` or `none`"); |
| 387 | return NULL; |
| 388 | } |
| 389 | |
| 390 | static char *escape_value(const tal_t *ctx, |
| 391 | const char *val TAKES, |
nothing calls this directly
no test coverage detected