writer

package
v0.0.0-...-78b7714 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Table

type Table struct {
	Header  []string
	Message string
	Rows    [][]string
	Output  io.Writer
}

func NewTable

func NewTable(header []string, message string, rows [][]string) *Table

NewTable returns a standard Table with a default of os.Stdout as the output

func (*Table) Render

func (t *Table) Render()

Render prints a standard table to the Output

type TableWithPositionHighlight

type TableWithPositionHighlight struct {
	Header             []string
	Message            string
	Rows               [][]string
	TeamLeaguePosition int
	Output             io.Writer
}

func NewTableWithPositionHighlight

func NewTableWithPositionHighlight(header []string, message string, rows [][]string, teamLeaguePosition int) *TableWithPositionHighlight

NewTableWithPositionHighlight returns a table with a position highlighted per the teamLeaguePosition int. Output is set to a default of os.Stdout

func (*TableWithPositionHighlight) Render

func (t *TableWithPositionHighlight) Render()

Render prints a table with a position highlight to the Output

Jump to

Keyboard shortcuts

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