Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OutputFormatter ¶
type OutputFormatter interface { // RegisterTableMiddlewares allows individual OutputFormatters to register middlewares that might be // necessary for them to do the proper output. For example, table and excel output require // flattening the row objects before output. RegisterTableMiddlewares(mw *middlewares.TableProcessor) error RegisterRowMiddlewares(mw *middlewares.TableProcessor) error ContentType() string Close(ctx context.Context, w io.Writer) error }
type RowOutputFormatter ¶ added in v0.3.0
type TableOutputFormatter ¶
type TableOutputFormatter interface { OutputFormatter OutputTable(ctx context.Context, table *types.Table, w io.Writer) error }
TableOutputFormatter is an output formatter that requires an entire table to be computed up front before it can be output.
NOTE(manuel, 2023-06-28) Since this is actually the first type of Formatter that was implemented, it is the current de facto standard. RowOutputFormatter has been added later and is thus not in wide spread use.
Click to show internal directories.
Click to hide internal directories.