treerender

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoColors = false

Functions

func RenderTree

func RenderTree(callback func(any) NodeData, nodes []any, level int) []byte

RenderTree renders graphical tree for the CLI output.

The callback is called for each node in the tree. It receives a NodeData structure that contains information about the node.

The nodes arguments is an initial list of nodes to render.

The level is used internally. It needs to be always 0.

Types

type NodeData

type NodeData struct {
	Name      string
	Params    map[string]any
	Ancestors []any
	Error     error
}

NodeData contains data for a single node in the tree.

Jump to

Keyboard shortcuts

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