reporting

package
v0.0.0-...-b4ea117 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MarkdownTable

type MarkdownTable struct {
	// contains filtered or unexported fields
}

func NewMarkdownTable

func NewMarkdownTable(columns ...string) *MarkdownTable

NewMarkdownTable returns a new Markdown table with the specified columns

func (*MarkdownTable) AddRow

func (t *MarkdownTable) AddRow(row ...string)

AddRow adds an entire row to the table, tracking widths for final formatting

func (*MarkdownTable) WriteTo

func (t *MarkdownTable) WriteTo(buffer *strings.Builder)

WriteTo renders the Markdown table into the specified buffer

type SparseTable

type SparseTable struct {
	// contains filtered or unexported fields
}

func NewSparseTable

func NewSparseTable(title string) *SparseTable

func (*SparseTable) AddColumn

func (table *SparseTable) AddColumn(col string)

AddColumn adds the specified column to the table if it doesn't already exist

func (*SparseTable) AddRow

func (table *SparseTable) AddRow(row string)

AddRow adds the specified row to the table if it doesn't already exist

func (*SparseTable) Columns

func (table *SparseTable) Columns() []string

Columns returns a slice containing the captions of all the columns of the table A new slice is returned to avoid violations of encapsulation

func (*SparseTable) Rows

func (table *SparseTable) Rows() []string

Rows returns a slice containing the captions of all the rows of the table A new slice is returned to avoid violations of encapsulation

func (*SparseTable) SetCell

func (table *SparseTable) SetCell(row string, col string, cell string)

SetCell sets the content of a given cell of the table

func (*SparseTable) SortColumns

func (table *SparseTable) SortColumns(less func(left string, right string) bool)

SortColumns allows columns to be sorted by caption

func (*SparseTable) SortRows

func (table *SparseTable) SortRows(less func(top string, bottom string) bool)

SortRows allows rows to be sorted by caption

func (*SparseTable) WriteTo

func (table *SparseTable) WriteTo(buffer *strings.Builder)

type StructureReport

type StructureReport struct {
	// contains filtered or unexported fields
}

StructureReport represents a hierarchical dump of structural information

func NewStructureReport

func NewStructureReport(line string) *StructureReport

NewStructureReport creates a new StructureReport

func (*StructureReport) Addf

func (sr *StructureReport) Addf(format string, a ...any) *StructureReport

Addf formats a new line in the report, returning a nested report for any additional information

func (*StructureReport) SaveTo

func (sr *StructureReport) SaveTo(writer io.Writer) error

type TypeCatalogReport

type TypeCatalogReport struct {
	// contains filtered or unexported fields
}

func (*TypeCatalogReport) AddHeader

func (tcr *TypeCatalogReport) AddHeader(lines ...string)

AddHeader allows you to add lines to the header of the report

func (*TypeCatalogReport) SaveTo

func (tcr *TypeCatalogReport) SaveTo(filePath string) error

SaveTo writes the report to the specified file

func (*TypeCatalogReport) WriteTo

func (tcr *TypeCatalogReport) WriteTo(writer io.Writer) error

type TypeCatalogReportOption

type TypeCatalogReportOption string
const (
	InlineTypes      TypeCatalogReportOption = "inline-types"
	IncludeFunctions TypeCatalogReportOption = "include-functions"
)

Jump to

Keyboard shortcuts

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