Documentation
¶
Index ¶
- func FormatError(err error) string
- func FormatOutput(data interface{}, format OutputFormat) (string, error)
- func FormatSuccess(message string, data interface{}) (string, error)
- func ToJSON(data interface{}) (string, error)
- func ToTable(data interface{}) (string, error)
- func ToYAML(data interface{}) (string, error)
- type OutputFormat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatOutput ¶
func FormatOutput(data interface{}, format OutputFormat) (string, error)
FormatOutput formats the output based on the specified format
func FormatSuccess ¶
FormatSuccess formats a success message with optional data
Types ¶
type OutputFormat ¶
type OutputFormat string
OutputFormat represents the output format type
const ( // FormatJSON outputs in JSON format FormatJSON OutputFormat = "json" // FormatTable outputs in table format FormatTable OutputFormat = "table" // FormatYAML outputs in YAML format FormatYAML OutputFormat = "yaml" )
Click to show internal directories.
Click to hide internal directories.