Documentation ¶
Index ¶
- type OutputFormatter
- func (f *OutputFormatter) AddRow(row types.Row)
- func (f *OutputFormatter) AddTableMiddleware(m middlewares2.TableMiddleware)
- func (f *OutputFormatter) AddTableMiddlewareAtIndex(i int, m middlewares2.TableMiddleware)
- func (f *OutputFormatter) AddTableMiddlewareInFront(m middlewares2.TableMiddleware)
- func (f *OutputFormatter) GetTable() (*types.Table, error)
- func (f *OutputFormatter) Output(ctx context.Context, w_ io.Writer) error
- func (f *OutputFormatter) SetColumnOrder(columns []types.FieldName)
- type OutputFormatterOption
- func WithHeaders(withHeaders bool) OutputFormatterOption
- func WithOutputFile(outputFile string) OutputFormatterOption
- func WithOutputFileTemplate(outputFileTemplate string) OutputFormatterOption
- func WithOutputMultipleFiles(outputMultipleFiles bool) OutputFormatterOption
- func WithSeparator(separator rune) OutputFormatterOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OutputFormatter ¶
type OutputFormatter struct { Table *types.Table OutputFile string OutputFileTemplate string OutputMultipleFiles bool WithHeaders bool Separator rune // contains filtered or unexported fields }
func NewCSVOutputFormatter ¶
func NewCSVOutputFormatter(opts ...OutputFormatterOption) *OutputFormatter
func NewTSVOutputFormatter ¶
func NewTSVOutputFormatter(opts ...OutputFormatterOption) *OutputFormatter
func (*OutputFormatter) AddRow ¶
func (f *OutputFormatter) AddRow(row types.Row)
func (*OutputFormatter) AddTableMiddleware ¶
func (f *OutputFormatter) AddTableMiddleware(m middlewares2.TableMiddleware)
func (*OutputFormatter) AddTableMiddlewareAtIndex ¶
func (f *OutputFormatter) AddTableMiddlewareAtIndex(i int, m middlewares2.TableMiddleware)
func (*OutputFormatter) AddTableMiddlewareInFront ¶
func (f *OutputFormatter) AddTableMiddlewareInFront(m middlewares2.TableMiddleware)
func (*OutputFormatter) SetColumnOrder ¶
func (f *OutputFormatter) SetColumnOrder(columns []types.FieldName)
type OutputFormatterOption ¶
type OutputFormatterOption func(*OutputFormatter)
func WithHeaders ¶
func WithHeaders(withHeaders bool) OutputFormatterOption
func WithOutputFile ¶
func WithOutputFile(outputFile string) OutputFormatterOption
func WithOutputFileTemplate ¶
func WithOutputFileTemplate(outputFileTemplate string) OutputFormatterOption
func WithOutputMultipleFiles ¶
func WithOutputMultipleFiles(outputMultipleFiles bool) OutputFormatterOption
func WithSeparator ¶
func WithSeparator(separator rune) OutputFormatterOption
Click to show internal directories.
Click to hide internal directories.