def parse.choice2

cswap-bend-cli@0.1.0.0 · setwrite.bend:89

import cswap-bend-cli@0.1.0.0/setwrite.bend as Setwrite
import Base
import cswap-bend-cli@0.1.0.0/json.bend as Json

89def parse.choice2(ok: Bool, dot: String, choices: String, raw: String) -> Parsed:
90  match ok:
91    case True{}:
92      Good{Json.JStr{raw}}
93    case False{}:
94      Bad{dot ++ " must be one of: " ++ String.join(String.split(choices, ','), ", ")}

Uses (8)

Used by (1)