0
0
mirror of https://github.com/crazy-max/diun.git synced 2024-12-22 19:38:28 +00:00
crazy-max_diun/vendor/github.com/jedib0t/go-pretty/v6/table/writer.go
dependabot[bot] 6f7b5b313d
chore(deps): bump github.com/jedib0t/go-pretty/v6 from 6.5.9 to 6.6.5
Bumps [github.com/jedib0t/go-pretty/v6](https://github.com/jedib0t/go-pretty) from 6.5.9 to 6.6.5.
- [Release notes](https://github.com/jedib0t/go-pretty/releases)
- [Commits](https://github.com/jedib0t/go-pretty/compare/v6.5.9...v6.6.5)

---
updated-dependencies:
- dependency-name: github.com/jedib0t/go-pretty/v6
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-15 14:33:08 +00:00

50 lines
1.2 KiB
Go

package table
import (
"io"
)
// Writer declares the interfaces that can be used to set up and render a table.
type Writer interface {
AppendFooter(row Row, configs ...RowConfig)
AppendHeader(row Row, configs ...RowConfig)
AppendRow(row Row, configs ...RowConfig)
AppendRows(rows []Row, configs ...RowConfig)
AppendSeparator()
ImportGrid(grid interface{}) bool
Length() int
Pager(opts ...PagerOption) Pager
Render() string
RenderCSV() string
RenderHTML() string
RenderMarkdown() string
RenderTSV() string
ResetFooters()
ResetHeaders()
ResetRows()
SetAutoIndex(autoIndex bool)
SetCaption(format string, a ...interface{})
SetColumnConfigs(configs []ColumnConfig)
SetIndexColumn(colNum int)
SetOutputMirror(mirror io.Writer)
SetRowPainter(painter interface{})
SetStyle(style Style)
SetTitle(format string, a ...interface{})
SortBy(sortBy []SortBy)
Style() *Style
SuppressEmptyColumns()
SuppressTrailingSpaces()
// deprecated; in favor if Style().Size.WidthMax
SetAllowedRowLength(length int)
// deprecated; in favor of Style().HTML.CSSClass
SetHTMLCSSClass(cssClass string)
// deprecated; in favor of Pager()
SetPageSize(numLines int)
}
// NewWriter initializes and returns a Writer.
func NewWriter() Writer {
return &Table{}
}