Documentation ¶
Index ¶
- type MarkdownTable
- type SparseTable
- func (table *SparseTable) AddColumn(col string)
- func (table *SparseTable) AddRow(row string)
- func (table *SparseTable) Columns() []string
- func (table *SparseTable) Rows() []string
- func (table *SparseTable) SetCell(row string, col string, cell string)
- func (table *SparseTable) SortColumns(less func(left string, right string) bool)
- func (table *SparseTable) SortRows(less func(top string, bottom string) bool)
- func (table *SparseTable) WriteTo(buffer *strings.Builder)
- type StructureReport
- type TypeCatalogReport
- type TypeCatalogReportOption
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
type TypeCatalogReport ¶
type TypeCatalogReport struct {
// contains filtered or unexported fields
}
func NewTypeCatalogReport ¶
func NewTypeCatalogReport(defs astmodel.TypeDefinitionSet, options ...TypeCatalogReportOption) *TypeCatalogReport
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
type TypeCatalogReportOption ¶
type TypeCatalogReportOption string
const ( InlineTypes TypeCatalogReportOption = "inline-types" IncludeFunctions TypeCatalogReportOption = "include-functions" )