table

package
v0.2.66 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OutputFormatter

type OutputFormatter struct {
	Table               *types.Table
	OutputFileTemplate  string
	OutputMultipleFiles bool

	TableFormat string
	OutputFile  string
	// contains filtered or unexported fields
}

func NewOutputFormatter

func NewOutputFormatter(tableFormat string, opts ...OutputFormatterOption) *OutputFormatter

func (*OutputFormatter) AddRow

func (tof *OutputFormatter) AddRow(row types.Row)

func (*OutputFormatter) AddTableMiddleware

func (tof *OutputFormatter) AddTableMiddleware(m middlewares.TableMiddleware)

func (*OutputFormatter) AddTableMiddlewareAtIndex

func (tof *OutputFormatter) AddTableMiddlewareAtIndex(i int, m middlewares.TableMiddleware)

func (*OutputFormatter) AddTableMiddlewareInFront

func (tof *OutputFormatter) AddTableMiddlewareInFront(m middlewares.TableMiddleware)

func (*OutputFormatter) GetTable

func (tof *OutputFormatter) GetTable() (*types.Table, error)

func (*OutputFormatter) Output

func (tof *OutputFormatter) Output() (string, error)

func (*OutputFormatter) SetColumnOrder

func (tof *OutputFormatter) SetColumnOrder(columnOrder []types.FieldName)

type OutputFormatterOption

type OutputFormatterOption func(*OutputFormatter)

func WithOutputFile

func WithOutputFile(outputFile string) OutputFormatterOption

func WithOutputFileTemplate

func WithOutputFileTemplate(outputFileTemplate string) OutputFormatterOption

func WithOutputMultipleFiles

func WithOutputMultipleFiles(outputMultipleFiles bool) OutputFormatterOption

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL