Documentation
¶
Overview ¶
Copyright © 2025 Benny Powers
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright © 2025 Benny Powers ¶
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright © 2025 Benny Powers ¶
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright © 2025 Benny Powers ¶
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- func FormatMarkdownTable(headers []string, rows [][]string) string
- func MapToTableRows[T M.Renderable](items []T) [][]string
- func RemoveEmptyColumns(headers []string, rows [][]string) ([]string, [][]string)
- func Render(r M.Renderable, opts RenderOptions, pred M.PredicateFunc) (string, error)
- func RenderMarkdown(r M.Renderable, opts RenderOptions, pred M.PredicateFunc) (string, error)
- func RenderModulesTable(manifest *M.Package, opts RenderOptions) (string, error)
- func RenderTable(title string, headers []string, rows [][]string, columns []string) (string, error)
- func RenderTagsTable(manifest *M.Package, opts RenderOptions) (string, error)
- func RenderTree(title string, renderable M.Renderable, pred M.PredicateFunc) (string, error)
- type RenderOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatMarkdownTable ¶ added in v0.11.0
FormatMarkdownTable renders headers and rows as a valid markdown table.
func MapToTableRows ¶
func MapToTableRows[T M.Renderable](items []T) [][]string
MapToTableRows maps a slice of Renderables to [][]string.
func RemoveEmptyColumns ¶ added in v0.1.17
RemoveEmptyColumns filters out columns where all values in all rows are empty (""). Always retains the first column (assumed identifier).
func Render ¶ added in v0.1.17
func Render(r M.Renderable, opts RenderOptions, pred M.PredicateFunc) (string, error)
Render recursively renders a Renderable, creating sectioned tables.
func RenderMarkdown ¶ added in v0.11.0
func RenderMarkdown(r M.Renderable, opts RenderOptions, pred M.PredicateFunc) (string, error)
RenderMarkdown renders a Renderable as valid markdown tables (no ANSI).
func RenderModulesTable ¶ added in v0.2.0
func RenderModulesTable(manifest *M.Package, opts RenderOptions) (string, error)
func RenderTable ¶
TODO: extract to internal/tui as a generic table wrapper (needs decoupling from manifest types) RenderTable renders a simple table with a title.
func RenderTagsTable ¶ added in v0.2.0
func RenderTagsTable(manifest *M.Package, opts RenderOptions) (string, error)
func RenderTree ¶ added in v0.1.17
func RenderTree(title string, renderable M.Renderable, pred M.PredicateFunc) (string, error)
Types ¶
type RenderOptions ¶ added in v0.1.17
RenderOptions provides options for the Render function.