def convert
import cswap-bend-cli@0.1.0.0/fmt/out.bend as Outimport Base
import cswap-bend-cli@0.1.0.0/cmd.bend as Cmd
148# The command's output in format `f` (text leaves it alone, and so does json
149# when the command already printed JSON: that output is the --json output).
150def convert(f: Fmt, key: String, +o: Cmd.Out) -> Cmd.Out:
151 match f:
152 case FText{}:
153 o
154 case _:
155 conv(f, key, o, doc_of(o))