Skip to main content

resolve_format

Function resolve_format 

Source
pub fn resolve_format(explicit_format: Option<&str>) -> &'static str
Expand description

Determine the output format to use.

Resolution order:

  1. explicit_format if Some.
  2. "table" when stdout is a TTY.
  3. "json" otherwise.