Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatValue ¶
FormatValue converts a value to its string representation for table/csv/plain output.
Types ¶
type Format ¶
type Format string
Format represents an output format
const ( FormatTable Format = "table" FormatJSON Format = "json" FormatJSONMulti Format = "json-multi" // internal: like json but triggers column selection in selectTableColumns FormatCSV Format = "csv" FormatYAML Format = "yaml" FormatPlain Format = "plain" FormatXML Format = "xml" // Classic API native format — pretty-printed XML FormatRaw Format = "raw" // Exact wire bytes, no conversion or formatting )
type Formatter ¶
type Formatter struct {
// contains filtered or unexported fields
}
Formatter handles output formatting
func (*Formatter) PrintBytes ¶
PrintBytes writes bytes to the output. XML is pretty-printed unless the format is FormatRaw, which writes exact wire bytes. Used by Classic API commands to emit XML when no structured format is requested.
func (*Formatter) PrintError ¶
PrintError outputs an error in the appropriate format
Click to show internal directories.
Click to hide internal directories.