tree

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExportValue

type ExportValue[T any] struct {
	Path  string
	Value T
}

type Tree

type Tree[T any] struct {
	// contains filtered or unexported fields
}

路由树

func (*Tree[T]) ExportTreeMethon

func (t *Tree[T]) ExportTreeMethon(p string) []*ExportValue[T]

递归遍历路由树并写入 slice

func (*Tree[T]) Get

func (t *Tree[T]) Get(route string) (T, []uint8)

获取路由

func (*Tree[T]) Set

func (t *Tree[T]) Set(route string, value T)

设置路由

Jump to

Keyboard shortcuts

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