dtree

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Branch

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

func (*Branch) GetTree added in v0.1.298

func (t *Branch) GetTree() *Tree

func (*Branch) Value

func (t *Branch) Value() interface{}

Value returns the latest value stored in node t if it represents a leaf, nil otherwise. Value is safe to call on nil Tree.

type Tree

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

func (*Tree) Add

func (t *Tree) Add(path []string, value interface{}) error

func (*Tree) Get

func (t *Tree) Get(path []string) *Branch

Get returns the Tree node if path points to it, nil otherwise. All nodes in path must be fully specified with no globbing (*).

func (*Tree) GetBranch added in v0.1.298

func (t *Tree) GetBranch() map[string]*Branch

func (*Tree) GetLeafValue

func (t *Tree) GetLeafValue(path []string) interface{}

GetLeafValue returns the leaf value if path points to a leaf in t, nil otherwise. All nodes in path must be fully specified with no globbing (*).

func (*Tree) GetLpm

func (t *Tree) GetLpm(path []string) interface{}

Jump to

Keyboard shortcuts

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