Clojure-only namespace for CLI-specific utilities, used by the
:cli
and :server
aliases instead of the general API.
Clojure-only namespace for CLI-specific utilities, used by the `:cli` and `:server` aliases instead of the general API.
(conj-argv values v)
Function to conj a non-array-valued arg v
to pre-existing values
.
Function to conj a non-array-valued arg `v` to pre-existing `values`.
(conj-argv-or-array values v)
Function to conj an array-valued or non-array-valued arg v
to
pre-existing values
. An array-valued v
is presumed to be a vector
(as opposed to a list or lazy seq).
Function to conj an array-valued or non-array-valued arg `v` to pre-existing `values`. An array-valued `v` is presumed to be a vector (as opposed to a list or lazy seq).
(handle-parsed-args {:keys [options summary errors]})
Given the return value of cli/parse-opts
, return either :error
,
:help
or the parsed options
map. In the :error
case, print the
CLI errors to stderr, and in the :help
case, print the --help
command result to stdout.
Given the return value of `cli/parse-opts`, return either `:error`, `:help` or the parsed `options` map. In the `:error` case, print the CLI errors to stderr, and in the `:help` case, print the `--help` command result to stdout.
(print-assert-errors ex)
Handle all possible assertions given an ExceptionInfo ex
thrown from
the persephone.utils.asserts
namespace. Print assertion exceptions to
stderr using printerr
, or re-throw if not recognized.
Handle all possible assertions given an ExceptionInfo `ex` thrown from the `persephone.utils.asserts` namespace. Print assertion exceptions to stderr using `printerr`, or re-throw if not recognized.
(printerr & error-messages)
Print the error-messages
vector line-by-line to stderr.
Print the `error-messages` vector line-by-line to stderr.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close