tree

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cloneable

type Cloneable interface {
	Clone() interface{}
}

type OnAdded

type OnAdded func(path []string, element interface{})

type OnRemoved

type OnRemoved func(path []string, element interface{})

type Predicate

type Predicate func(path []string, element interface{}) bool

type Tree

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

func New

func New() *Tree

func (*Tree) All

func (instance *Tree) All(consumer func(interface{}) error) error

func (*Tree) Clone

func (instance *Tree) Clone() *Tree

func (*Tree) Find

func (instance *Tree) Find(path []string) (result []interface{}, err error)

func (*Tree) HasContent

func (instance *Tree) HasContent() bool

func (*Tree) Put

func (instance *Tree) Put(path []string, element interface{}) error

func (*Tree) Remove

func (instance *Tree) Remove(predicate Predicate) error

Jump to

Keyboard shortcuts

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