tree

package
v0.167.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package tree wraps charm.land/lipgloss/v2/tree so packages outside the styling layer (notably internal/domain formatters) can render rounded-connector trees without importing lipgloss directly — the same leaf-package convention as internal/ui/styles/{colors,icons}. Output is plain text; connectors only.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tree

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

Tree is a node in a connector tree. Start with Root; the zero value is not usable.

func Root

func Root(label string) *Tree

Root starts a new tree with the given label.

func (*Tree) Child

func (t *Tree) Child(children ...any) *Tree

Child appends children; each may be a string or a nested *Tree.

func (*Tree) Rounded

func (t *Tree) Rounded() *Tree

Rounded switches connectors to rounded glyphs (├──/╰──); children inherit it.

func (*Tree) String

func (t *Tree) String() string

String renders the tree to plain text.

Jump to

Keyboard shortcuts

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