list

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: GPL-3.0 Imports: 16 Imported by: 0

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/>.

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/>.

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/>.

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatMarkdownTable added in v0.11.0

func FormatMarkdownTable(headers []string, rows [][]string) string

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

func RemoveEmptyColumns(headers []string, rows [][]string) ([]string, [][]string)

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

func RenderTable(title string, headers []string, rows [][]string, columns []string) (string, error)

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

type RenderOptions struct {
	Columns         []string
	IncludeSections []string
	Markdown        bool
}

RenderOptions provides options for the Render function.

Jump to

Keyboard shortcuts

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