trie

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Trie

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

* This trie structure is only threadsafe if the root node is queried (due to golang not having and easy re-entrant lock for me to just use) *

func NewTrie

func NewTrie(values ...string) *Trie

func (*Trie) Add

func (t *Trie) Add(s string)

func (*Trie) PrefixMatch

func (t *Trie) PrefixMatch(prefix string) (result []string)

func (*Trie) Remove

func (t *Trie) Remove(s string) bool

Jump to

Keyboard shortcuts

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