tree

package
v2.16.15 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

Documentation

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 wrapper over tha root node od a tree

func New

func New(v interface{}) (*Tree, error)

New returns a new Tee containning a decomposed version of v

func (*Tree) Add

func (t *Tree) Add(ks []string, v interface{})

Add introduces the value v at the path defined by ks

func (*Tree) Append

func (t *Tree) Append(src, dst []string)

Append appends the contents of the array src to the array dst

func (*Tree) Del

func (t *Tree) Del(ks []string)

Del removes all nodes and edges in the tree matching the path defined by ks

func (*Tree) Get

func (t *Tree) Get(ks []string) interface{}

Get returns all nodes and edges in the tree matching the path defined by ks

func (*Tree) Move

func (t *Tree) Move(src, dst []string)

Move moves all nodes and edges in the tree matching the path defined by src to dst

func (*Tree) Sort

func (t *Tree) Sort()

Sort sorts the edges in the tree

Jump to

Keyboard shortcuts

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