cmd.bend checks
raw source on the hub · import cswap-bend-cli@0.1.0.0/cmd.bend as Cmd
2 imports
import Base import ./json.bend as Json
Types
type Out source · line 7 · raw
Data
Out@code:U32 -> @out:String -> @err:String -> Out
Definitions
def ok source · line 10 · raw
@text:String -> Out
def silent source · line 13 · raw
Out
def fail source · line 17 · raw
@msg:String -> Out
A handled error, text mode: Error: <message> on stderr, exit 1.
def usage source · line 21 · raw
@msg:String -> Out
A usage error (argparse): the message on stderr, exit 2.
def json_fail source · line 25 · raw
@kind:String -> @msg:String -> Out
The --json error envelope: stdout, exit 1.
def failed source · line 31 · raw
@json:Bool -> @kind:String -> @msg:String -> Out
json picks the envelope or the text error.
def doc source · line 39 · raw
@j:0x0717344745a30ebad1f19045228e8f18/json.Json -> Out
A JSON document on stdout, indent=2.