def parse.choice2
import cswap-bend-cli@0.1.0.0/setwrite.bend as Setwriteimport 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, ','), ", ")}