package
Version:
v0.0.0-...-bcb8294
Opens a new window with list of versions in this module.
Published: Feb 3, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Formatter interface {
Format(data interface{}) error
Name() string
}
Formatter is the interface for all data output formatters.
New creates the proper formatter based on the given name.
JSON formats into text.
NewJSON acts as the factory for formatter.JSON.
func (f *JSON) Format(data interface{}) error
Format formats data as json output.
Name obtains the name of the formatter.
Text is the formatter to format data into readable text.
NewText acts as the factory for formatter.Text.
func (f *Text) Format(data interface{}) error
Format formats data as simple text output.
Name obtains the name of the formatter.
YAML formats into yaml.
NewYAML acts as the factory for formatter.YAML.
func (f *YAML) Format(data interface{}) error
Format formats data as yaml output.
Name obtains the name of the formatter.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.