Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTree ¶
func BuildTree[T comparable, N HzmTree[T]](nodes []N) []N
Types ¶
type BaseTree ¶
type BaseTree[T comparable] struct { Id T ParentId T Children []HzmTree[T] }
func (*BaseTree[T]) AddChildren ¶
func (*BaseTree[T]) GetParentId ¶
func (b *BaseTree[T]) GetParentId() T
type HzmTree ¶
type HzmTree[T comparable] interface { GetId() T GetParentId() T AddChildren(...HzmTree[T]) }
Click to show internal directories.
Click to hide internal directories.