tree

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 1 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 {
	Parent     *Node
	Child      []*Node
	Connectors []string
	Level      int
	Meta       *item.FileInfo
}

func (*Node) AddChild

func (n *Node) AddChild(child *Node) *Node

func (*Node) Apply2Child

func (n *Node) Apply2Child(f func(node *Node))

func (*Node) Apply2ChildSlice

func (n *Node) Apply2ChildSlice(connectors func(nodes []*Node))

func (*Node) ApplyThis

func (n *Node) ApplyThis(p func(node *Node))

type Option

type Option = func(tree *Tree)

func WithCap

func WithCap(cap int) Option

type Tree

type Tree struct {
	Root *Node
}

func NewTree

func NewTree(ops ...Option) *Tree

Jump to

Keyboard shortcuts

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