Documentation
¶
Overview ¶
Package treeview renders a generic node tree to an io.Writer as an indented tree(1)-style ASCII tree using box-drawing connectors. It has no dependency on the snapshot source model, the cluster, or the filesystem.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Render ¶
Render writes the tree rooted at root to w using tree(1)-style box-drawing connectors. The root label is printed with no connector; nested entries use ├── / └── connectors with │ / space continuation indentation based on depth and last-sibling position. Output is deterministic for a given input.
Types ¶
type Node ¶
type Node struct {
// Label is the display text for this node.
Label string
// Children are the direct child sub-trees rendered under this node.
Children []Node
// Volumes are leaf string entries rendered after Children under this node.
Volumes []string
}
Node is an input-agnostic tree node. Callers map their domain model into this struct; the renderer imposes no dependency on k8s or internal snapshot packages.
Rendering order under any parent: Children are emitted first (in slice order), then Volumes (in slice order). All entries share the same last-sibling connector.