printing

package
v0.0.36 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 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 Node

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

func (*Node) Children

func (n *Node) Children() (c []tree.Node)

func (*Node) Data

func (n *Node) Data() interface{}

type PrintFormat added in v0.0.13

type PrintFormat int
const (
	FormatTable PrintFormat = iota // Default
	FormatTree
	FormatYAML
)

type PrintOpts added in v0.0.13

type PrintOpts struct {
	// The format to use when printing the output.
	Format PrintFormat

	// Whether to show all entries, including those that are not matched by the
	// filters, but highlighting the matched ones.
	ShowAll bool

	// Whether to hide the group columns in the table format.
	HideGroupColumns bool

	// Whether to show only the identifier names instead of the full names.
	ShowIdentifierNames bool

	// Whether to highlight the matches in the output (when ShowAll is true and
	// some filters have been applied).
	HighlightMatches bool
}

func NewPrintOpts added in v0.0.13

func NewPrintOpts(formatTree, formatYaml, showAll, hideGroupColumns, showIdentifierNames, highlightMatches bool) *PrintOpts

type Printer

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

func NewPrinter

func NewPrinter(opts *PrintOpts, catalog *live.Catalog) *Printer

func (*Printer) PrintGroups

func (p *Printer) PrintGroups(matchingGroups []*live.Group) error

func (*Printer) PrintPeople

func (p *Printer) PrintPeople(matchingPeople []*live.Person) error

type YamlResource

type YamlResource interface {
	GetYaml() string
}

Jump to

Keyboard shortcuts

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