def plain

cswap-bend-cli@0.1.0.0 · fmt/out.bend:113

import cswap-bend-cli@0.1.0.0/fmt/out.bend as Out
import Base
import cswap-bend-cli@0.1.0.0/json.bend as Json

113def plain(+code: U32, +out: String, +err: String) -> Maybe<&2, Json.Json>:
114  Bool.pick(Maybe<&2, Json.Json>, U32.is_eq(code, 0), Some{message_doc(text_of(out, err))},
115  Bool.pick(Maybe<&2, Json.Json>, U32.is_eq(code, 1) && String.is_empty(out) && Bool.not(String.is_empty(err)), Some{error_doc(err)}, None{}))

Uses (12)

Used by (1)