package
Version:
v0.0.0-...-bc789a4
Opens a new window with list of versions in this module.
Published: Apr 13, 2025
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Node struct {
ID int
Children []*Node
}
Node type defines a node of a tree
func Build(records []Record) (*Node, error)
Build function restructures the RecordList in a tree structure
Add method adds a Record to the Node hierarchy
type Record struct {
ID int
Parent int
}
Record type defines a record to be restructured
Source Files
¶
Click to show internal directories.
Click to hide internal directories.