MCPcopy Create free account
hub / github.com/ElementsProject/lightning / flag_option

Function flag_option

plugins/libplugin.c:1681–1692  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1679}
1680
1681char *flag_option(struct command *cmd, const char *arg, bool check_only, bool *i)
1682{
1683 /* We only get called if the flag was provided, so *i should be false
1684 * by default */
1685 assert(check_only || *i == false);
1686 if (!streq(arg, "true"))
1687 return tal_fmt(tmpctx, "Invalid argument '%s' passed to a flag", arg);
1688
1689 if (!check_only)
1690 *i = true;
1691 return NULL;
1692}
1693
1694char *charp_option(struct command *cmd, const char *arg, bool check_only, char **p)
1695{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected