output

package
v1.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 18 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Formats = []string{"table", "json", "yaml", "tree"}

Formats are the values --format accepts.

Functions

func Format

func Format(cmd *cobra.Command, body []byte, statusCode int) error

Format prints a successful response in the selected format, or returns an *utils.APIError for an error status. --jq filters the JSON first.

func SelectedFormat added in v1.3.0

func SelectedFormat(cmd *cobra.Command) (string, error)

SelectedFormat resolves the output format: --format, then the "format" config key / environment variable, then table on a terminal and JSON when the output is piped or redirected.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL