WardrikDaemon. CLI. Table
(wardrik_daemon v0.1.0-rc.1)
Copy Markdown
Prints rows as columns, each as wide as its widest cell, under a faint header.
Summary
Functions
@spec pairs(WardrikDaemon.CLI.Context.t(), [{String.t(), term()}]) :: :ok
Prints pairs of a label and a value, one a line. Leaves out those with no value.
@spec print(WardrikDaemon.CLI.Context.t(), [String.t()], [[term()]], String.t()) :: :ok
Prints rows under header, or empty if there are none. A nil cell is empty.
@spec show( WardrikDaemon.CLI.Context.t(), term(), [String.t()], [[term()]], String.t() ) :: :ok
Writes answer as JSON if the command was given --json. Otherwise prints it as print/4 does.