package
0.0.0-20230302113223-949e47c65976
Repository: https://github.com/napptive/go-utils.git
Documentation: pkg.go.dev
# Functions
GetPrinter creates a ResultPrinter attending to the user preferences.
NewJSONPrinter build a new ResultPrinter whose output is the JSON representation of the object.
NewTablePrinter builds a new ResultPrinter whose output is a human-readable table-like representation of the object.
No description provided by the author
PrintResultOrError prints the result using a given printer or the error.
# Constants
MinWidth is the minimal cell width including any padding.
Padding added to a cell before computing its width.
PaddingChar with the ASCII char used for padding.
TabWidth is the width of tab characters (equivalent number of spaces).
TabWriterFlags with the formatting options.
# Structs
JSONPrinter structure with the implementation required to print as JSON a given result.
TablePrinter structure with the implementation required to print in a human-readable table format a given result.
# Interfaces
ResultPrinter defines the operations that a printer must define.