Help us shape the future of Go! Take the 2026 Go Developer Survey

trie

package
v3.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: AGPL-3.0 Imports: 0 Imported by: 16

Documentation

Overview

Package trie implements a simple trie tree for minio server/tools borrows idea from - https://godoc.org/golang.org/x/text/internal/triegen.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

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

Node trie tree node container carries value and children.

type Trie

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

Trie is a trie container.

func NewTrie

func NewTrie() *Trie

NewTrie create a new trie.

func (*Trie) Insert

func (t *Trie) Insert(key string)

Insert insert a key.

func (*Trie) PrefixMatch

func (t *Trie) PrefixMatch(key string) []string

PrefixMatch - prefix match.

func (*Trie) Root

func (t *Trie) Root() *Node

Root returns root node.

func (*Trie) Walk

func (t *Trie) Walk(node *Node) (ret []string)

Walk the tree.

Jump to

Keyboard shortcuts

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