def response
import cswap-bend-cli@0.1.0.0/rpcmsg.bend as Rpcmsgimport Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
import cswap-bend-cli@0.1.0.0/cmd.bend as Cmd
import cswap-bend-cli@0.1.0.0/fmt/out.bend as O
237# The response document for a command's output.
238def response(+id: Json.Json, o: Cmd.Out) -> Json.Json:
239 match o:
240 case Cmd.Out{+code, out, +err}:
241 response2(U32.is_eq(code, 0), id, code, err, O.doc_of(Cmd.Out{code, out, err}))